X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=server.c;h=e8dddf5bc27a80238436811b7d2b46680cddb3d7;hp=dfac4c588910bfbbf3ae1469d26992849b811647;hb=1d54a5412ef39590022e6dd4448881f267e96d0b;hpb=92f089b820b45a5dbdc5b4f69d596105d5acba68 diff --git a/server.c b/server.c index dfac4c58..e8dddf5b 100644 --- a/server.c +++ b/server.c @@ -57,17 +57,15 @@ * * - Doubly linked lists: \ref list.h, * - Ring buffer: \ref ringbuffer.c, \ref ringbuffer.h, - * - Hashing: \ref hash.h, \ref sha1.h, \ref sha1.c, - * - Crypto: \ref crypt.c. + * - Crypto: \ref crypt.c, \ref crypt.h. * - Forward error correction: \ref fec.c. */ #include -#include #include -#include #include #include +#include #include "para.h" #include "error.h" @@ -90,6 +88,7 @@ #include "signal.h" #include "user_list.h" #include "color.h" +#include "version.h" /** Define the array of error lists needed by para_server. */ INIT_SERVER_ERRLISTS; @@ -146,17 +145,14 @@ static int want_colors(void) static void init_colors_or_die(void) { - int ret, i; + int i; if (!want_colors()) return; daemon_set_flag(DF_COLOR_LOG); daemon_set_default_log_colors(); - for (i = 0; i < conf.log_color_given; i++) { - ret = daemon_set_log_color(conf.log_color_arg[i]); - if (ret < 0) - exit(EXIT_FAILURE); - } + for (i = 0; i < conf.log_color_given; i++) + daemon_set_log_color_or_die(conf.log_color_arg[i]); } /* @@ -428,6 +424,7 @@ static void init_server_command_task(int argc, char **argv) if (ret < 0) goto err; add_close_on_fork_list(sct->listen_fd); /* child doesn't need the listener */ + sprintf(sct->task.status, "server command task"); register_task(&sct->task); return; err: