From 85f030c9ddcd1f3266d4eb6b51a9e89e1a4f5c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paulius=20Ratkevi=C4=8Dius?= Date: Wed, 27 Mar 2019 12:46:50 +0200 Subject: daemon: add networking code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port networking code from previous project. This commit is part of ticket 3. Signed-off-by: Paulius Ratkevičius --- src/daemon/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/daemon/main.c') 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 #include #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 */ + } } -- cgit v1.2.3