diff options
author | Mattias Andrée <maandree@kth.se> | 2016-07-12 20:54:59 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-07-12 20:54:59 +0200 |
commit | f3bfd838f5c0106cd5e95110f711974e4e899f46 (patch) | |
tree | 6147662101f8ea8c43b3d77707152b8df13072bb /src/coopgammad.c | |
parent | Add -q and -qq (diff) | |
download | coopgammad-f3bfd838f5c0106cd5e95110f711974e4e899f46.tar.gz coopgammad-f3bfd838f5c0106cd5e95110f711974e4e899f46.tar.bz2 coopgammad-f3bfd838f5c0106cd5e95110f711974e4e899f46.tar.xz |
Implement main loop and handling of inbound connections + remove server_message (though like this was an mds server and not a stand-alone server)
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/coopgammad.c')
-rw-r--r-- | src/coopgammad.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/coopgammad.c b/src/coopgammad.c index 410d722..7398d51 100644 --- a/src/coopgammad.c +++ b/src/coopgammad.c @@ -87,14 +87,6 @@ char* socketpath = NULL; int gerror; /** - * Initialisation stage - * - * Used to keep track on what to destroy, of those things that - * must only be destroyed if they have been initialised - */ -int init_stage = 0; - -/** * The adjustment method, -1 for automatic */ int method = -1; @@ -740,14 +732,6 @@ static int initialise(int full, int preserve, int foreground, int keep_stderr, i if (signal(SIGTERM, sig_terminate) == SIG_ERR) goto fail; - if (full) - { - /* Initialise the server */ - if (server_initialise() < 0) - goto fail; - init_stage++; - } - /* Place in the background unless -f */ if (full && (foreground == 0)) { @@ -860,8 +844,6 @@ static void destroy(int full) { size_t i; - if (init_stage >= 1) - server_destroy(full); if (full && (socketfd >= 0)) { shutdown(socketfd, SHUT_RDWR); @@ -982,10 +964,6 @@ static size_t marshal(void* buf) off += server_marshal(bs ? bs + off : NULL); if (bs != NULL) - *(int*)(bs + off) = init_stage; - off += sizeof(int); - - if (bs != NULL) *(int*)(bs + off) = method; off += sizeof(int); @@ -1061,9 +1039,6 @@ static size_t unmarshal(void* buf) if (n == 0) return 0; - init_stage = *(int*)(bs + off); - off += sizeof(int); - method = *(int*)(bs + off); off += sizeof(int); |