diff options
author | Danny Holman <dholman@gymli.org> | 2023-01-04 00:56:33 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2023-01-04 00:56:33 -0600 |
commit | 36d00051de9152546eddfbc84223cee251aee87a (patch) | |
tree | 2f9c5ee2ee4308bac9148bf0422eb4bbccb978c1 /server/src | |
parent | a67f97b904c64b21381347299d095006f48e8bce (diff) |
server: add a main header and source file
Add a main header and source file so that every required header is
checked against the config.h generated by autoconf.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/logging.c | 4 | ||||
-rw-r--r-- | server/src/mini-rat.c | 13 | ||||
-rw-r--r-- | server/src/session.c | 4 |
3 files changed, 14 insertions, 7 deletions
diff --git a/server/src/logging.c b/server/src/logging.c index 66f1661..5a721b8 100644 --- a/server/src/logging.c +++ b/server/src/logging.c @@ -1,8 +1,4 @@ #include <logging.h> -#include <stdio.h> -#include <pthread.h> -#include <time.h> -#include <string.h> static const char *severe = "SEVERE"; static const char *warn = "WARN"; diff --git a/server/src/mini-rat.c b/server/src/mini-rat.c new file mode 100644 index 0000000..e0fd5d1 --- /dev/null +++ b/server/src/mini-rat.c @@ -0,0 +1,13 @@ +#include <logging.h> +#include <server.h> +#include <mini-rat.h> + +int main(int argc, char* argv[]) { + FILE *logfile = fopen("log.txt", "w"); + init_logging(stderr); + uint16_t port = 21115; + pthread_t listen_thread; + pthread_create(&listen_thread, NULL, listener, (void*)&port); + + pthread_exit(NULL); +} diff --git a/server/src/session.c b/server/src/session.c index b2b760c..2737f4b 100644 --- a/server/src/session.c +++ b/server/src/session.c @@ -1,8 +1,6 @@ #include <session.h> #include <util.h> -#include <stdlib.h> -#include <unistd.h> -#include <stdint.h> +#include <mini-rat.h> struct list_head sessions; uint16_t next_id = 1; |