X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=apps%2Fsilcd%2Fsilcd.c;fp=apps%2Fsilcd%2Fsilcd.c;h=d367328c6578fdb15942f922e108a2fc7525e4de;hp=14e3657f968d6fd64e6fdbb4b09caf8f00ea215a;hb=805fddcf6431e784f9f77114782a90c9d12f9cbe;hpb=faa97fdb56d0b85042a5d0149b73ce7022f04398 diff --git a/apps/silcd/silcd.c b/apps/silcd/silcd.c index 14e3657f..d367328c 100644 --- a/apps/silcd/silcd.c +++ b/apps/silcd/silcd.c @@ -245,9 +245,7 @@ SILC_TASK_CALLBACK(got_hup) SILC_TASK_CALLBACK(stop_server) { - /* Stop scheduler, the program will stop eventually after noticing - that the scheduler is down. */ - silc_schedule_stop(silcd->schedule); + silc_server_stop(silcd); } /* Dump server statistics into a file into /tmp directory */ @@ -747,15 +745,14 @@ int main(int argc, char **argv) silc_file_writefile(pidfile, buf, strlen(buf)); } - silc_server_drop_privs(silcd); } + silc_server_drop_privs(silcd); /* Run the server. When this returns the server has been stopped and we will exit. */ silc_server_run(silcd); - /* Stop the server and free it. */ - silc_server_stop(silcd); + /* Free server */ silc_server_config_destroy(silcd->config); silc_server_free(silcd);