/**
* \mainpage Main data structures and selected APIs:
*
- * - Server: \ref server_command, \ref sender,
+ * - Senders: \ref sender,
* - Audio file selector: \ref afs_info, \ref afs_table,
* - Audio format handler: \ref audio_format_handler, \ref afh_info
* - Receivers/filters/writers: \ref receiver, \ref receiver_node,
* - 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
/**
* Pointer to shared memory area for communication between para_server
- * and its children. Exported to vss.c. command.c and to afs.
+ * and its children. Exported to vss.c, command.c and to afs.
*/
struct misc_meta_data *mmd;
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);
- daemon_log_welcome("para_server");
+ daemon_log_welcome("server");
init_ipc_or_die(); /* init mmd struct and mmd->lock */
daemon_set_start_time();
init_user_list(user_list_file);