diff options
author | 2019-03-27 12:46:50 +0200 | |
---|---|---|
committer | 2019-03-29 14:41:25 +0200 | |
commit | 85f030c9ddcd1f3266d4eb6b51a9e89e1a4f5c26 (patch) | |
tree | 3110001a2cc39e3e11d90feaddbef3acd1d61c16 /src/daemon/main.c | |
parent | e2ee55bba2f55624e23dbcaeb3613dd03e60692d (diff) | |
download | usurpation-85f030c9ddcd1f3266d4eb6b51a9e89e1a4f5c26.tar.gz usurpation-85f030c9ddcd1f3266d4eb6b51a9e89e1a4f5c26.tar.bz2 usurpation-85f030c9ddcd1f3266d4eb6b51a9e89e1a4f5c26.zip |
daemon: add networking code.
Port networking code from previous project.
This commit is part of ticket 3.
Signed-off-by: Paulius Ratkevičius <pauliuz95@gmail.com>
Diffstat (limited to 'src/daemon/main.c')
-rw-r--r-- | src/daemon/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/daemon/main.c b/src/daemon/main.c index 9ecdd4d..a729f84 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -2,6 +2,7 @@ * Usurpation – server daemon main logic * * Copyright (C) 2019 Gediminas Jakutis + * Copyright (C) 2019 Paulius Ratkevičius * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,6 +23,7 @@ #include <time.h> #include <stdio.h> #include "settings.h" +#include "net.h" /* the logic is a placeholder right now */ int main(int argc, char **argv) @@ -31,6 +33,7 @@ int main(int argc, char **argv) printf("Usurpation daemon version %s starting\n", version); + net_init(6996); // To do: get port from settings. /* by default and if running by as a system service, the init system * needs to keep control of the process and thus only detach if * requested when ran manually by a user. @@ -41,5 +44,6 @@ int main(int argc, char **argv) while(!(nanosleep(&t, NULL))) { /* noop */ + } } |