integrate writers into para_audiod
[paraslash.git] / write_common.c
index de0502f..7fb8d12 100644 (file)
@@ -99,16 +99,6 @@ void wng_close(struct writer_node_group *g)
        }
 }
 
-static void wng_event_handler(struct task *t)
-{
-       struct writer_node_group *g = t->private_data;
-
-       PARA_INFO_LOG("%s\n", PARA_STRERROR(-t->ret));
-       unregister_task(t);
-       wng_close(g);
-       wng_destroy(g);
-}
-
 struct writer_node_group *wng_new(unsigned num_writers)
 {
        struct writer_node_group *g = para_calloc(sizeof(struct writer_node_group));
@@ -118,7 +108,6 @@ struct writer_node_group *wng_new(unsigned num_writers)
        g->written = para_calloc(num_writers * sizeof(size_t));
        g->task.private_data = g;
        g->task.post_select = wng_post_select;
-       g->task.event_handler = wng_event_handler;
        g->task.flags = POST_ADD_TAIL;
        return g;
 }
@@ -135,6 +124,7 @@ void *check_writer_arg(char *wa, int *writer_num)
 {
        int i;
 
+       *writer_num = -E_WRITE_COMMON_SYNTAX;
        PARA_INFO_LOG("checking  %s\n", wa);
        FOR_EACH_WRITER(i) {
                const char *name = writer_names[i];