X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=audiod.c;h=0f082e26504bcc0039be7ca7f4c36349aa7ccca2;hb=a775408e5d2e3b21dff741b89ff5330b397b5138;hp=75073ec22bcc2a09c8a548f57db1560b8df0cef8;hpb=67cb641c126769af98289539ff3425dfbf5e12e2;p=paraslash.git diff --git a/audiod.c b/audiod.c index 75073ec2..0f082e26 100644 --- a/audiod.c +++ b/audiod.c @@ -39,9 +39,10 @@ #include "signal.h" #include "version.h" +/** Array of error strings. */ +DEFINE_PARA_ERRLIST; + __printf_2_3 void (*para_log)(int, const char*, ...) = daemon_log; -/** define the array of error lists needed by para_audiod */ -INIT_AUDIOD_ERRLISTS; /** define the array containing all supported audio formats */ const char *audio_formats[] = {AUDIOD_AUDIO_FORMAT_ARRAY NULL}; @@ -596,7 +597,8 @@ static void open_filters(struct slot_info *s) EMBRACE(.name = f->name, .parent = parent, .handler = f->execute, .context = fn)); - f->open(fn); + if (f->open) + f->open(fn); sprintf(buf, "%s (slot %d)", f->name, (int)(s - slot)); fn->task = task_register(&(struct task_info) { .name = buf, @@ -1506,8 +1508,11 @@ int main(int argc, char *argv[]) daemon_set_priority(conf.priority_arg); daemon_drop_privileges_or_die(conf.user_arg, conf.group_arg); parse_config_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)) { + for (i = 0; i < conf.log_color_given; i++) + daemon_set_log_color_or_die(conf.log_color_arg[i]); + } init_random_seed_or_die(); daemon_set_flag(DF_LOG_TIME); daemon_set_flag(DF_LOG_HOSTNAME);