X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;ds=sidebyside;f=server.c;h=4d54f74b63d47e52fee508a899bc3b8970d1e1b6;hb=c0dca63e02352cae6a8c241dba4bc0d2c7cde050;hp=11397d029f8fbff5413ed504ffb758a906eb69b4;hpb=b15735ae7de59e0d9db43f23388d8ac47a6d2def;p=paraslash.git diff --git a/server.c b/server.c index 11397d02..4d54f74b 100644 --- a/server.c +++ b/server.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2010 Andre Noll + * Copyright (C) 1997-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -91,6 +91,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; @@ -147,17 +148,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]); } /* @@ -429,6 +427,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: