* - 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
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);
version_handle_flag("server", conf.version_given);
if (conf.help_given || conf.detailed_help_given)
print_help_and_die();
+ daemon_set_priority(conf.priority_arg);
daemon_drop_privileges_or_die(conf.user_arg, conf.group_arg);
/* parse config file, open log and set defaults */
parse_config_or_die(0);