]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - server.c
Simplify the error subsystem, get rid of error2.[ch].
[paraslash.git] / server.c
index 71a9ec505f6d096a1dc589a9cdf6c1f484e5090d..59a620477d092579a3e6d692e1b405dae7927a6b 100644 (file)
--- 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,
 #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);