]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audiod.c
Simplify the error subsystem, get rid of error2.[ch].
[paraslash.git] / audiod.c
index fedeff7af880a009d938e73087edb7ca6c83f267..0f082e26504bcc0039be7ca7f4c36349aa7ccca2 100644 (file)
--- a/audiod.c
+++ b/audiod.c
 #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,