X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=server.c;h=59a620477d092579a3e6d692e1b405dae7927a6b;hp=71a9ec505f6d096a1dc589a9cdf6c1f484e5090d;hb=a775408e5d2e3b21dff741b89ff5330b397b5138;hpb=75695bba841fc43094ebc669418187080cea00e6 diff --git a/server.c b/server.c index 71a9ec50..59a62047 100644 --- a/server.c +++ b/server.c @@ -18,7 +18,7 @@ * - Buffer trees: \ref buffer_tree.h, * - Sideband API: \ref sideband.h, * - Crypto: \ref crypt.h, \ref crypt_backend.h, - * - Error subsystem: \ref error.h, \ref error2.c, + * - Error subsystem: \ref error.h, * - Inter process communication: \ref ipc.h, * - Forward error correction: \ref fec.h, * - Daemons: \ref daemon.h, @@ -65,10 +65,10 @@ #include "ggo.h" #include "version.h" -__printf_2_3 void (*para_log)(int, const char*, ...) = daemon_log; +/** Array of error strings. */ +DEFINE_PARA_ERRLIST; -/** Define the array of error lists needed by para_server. */ -INIT_SERVER_ERRLISTS; +__printf_2_3 void (*para_log)(int, const char*, ...) = daemon_log; /** Shut down non-authorized connections after that many seconds. */ #define ALARM_TIMEOUT 10 @@ -207,8 +207,12 @@ void parse_config_or_die(int override) daemon_open_log_or_die(); } - daemon_init_colors_or_die(conf.color_arg, color_arg_auto, color_arg_no, - conf.logfile_given, conf.log_color_arg, conf.log_color_given); + if (daemon_init_colors_or_die(conf.color_arg, color_arg_auto, color_arg_no, + conf.logfile_given)) { + int i; + for (i = 0; i < conf.log_color_given; i++) + daemon_set_log_color_or_die(conf.log_color_arg[i]); + } daemon_set_flag(DF_LOG_PID); daemon_set_flag(DF_LOG_LL); daemon_set_flag(DF_LOG_TIME);