Removed the on_exit from sendcommand.c
authorDave West <davew@uncensored.citadel.org>
Fri, 16 May 2008 19:05:30 +0000 (19:05 +0000)
committerDave West <davew@uncensored.citadel.org>
Fri, 16 May 2008 19:05:30 +0000 (19:05 +0000)
Why didn't I do it properly the first time 8-)

citadel/sendcommand.c

index 0127536ab5b1f9e341d74fdde5156eb7992f31f3..ef76015de83a46e3339abf6af8fa6b332bd7ef74 100644 (file)
@@ -73,6 +73,8 @@ void remove_lockfile(void)
  */
 void nq_cleanup(int e)
 {
+       if (e == SIGALRM)
+               fprintf(stderr, "\nWatch dog time out.\n");
        remove_lockfile();
        exit(e);
 }
@@ -161,12 +163,6 @@ void sendcommand_die(void) {
 }
 
 
-void check_exit_code(int code, void *arg)
-{
-       if (code == SIGALRM)
-               fprintf(stderr, "\nWatch dog time out.\n");
-}
-
 
 /*
  * main
@@ -187,8 +183,6 @@ int main(int argc, char **argv)
        int ret, err;
        int server_shutting_down = 0;
        
-       on_exit (check_exit_code, NULL);
-
        strcpy(ctdl_home_directory, DEFAULT_PORT);
 
        strcpy(cmd, "");