Rename error handler() to event_handler()
authorAndre <maan@p133.(none)>
Tue, 23 May 2006 21:49:31 +0000 (23:49 +0200)
committerAndre <maan@p133.(none)>
Tue, 23 May 2006 21:49:31 +0000 (23:49 +0200)
sched.c
sched.h
write.c
write_common.c

diff --git a/sched.c b/sched.c
index 6233e40..9db7c09 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -16,9 +16,9 @@ static void sched_preselect(struct sched *s)
 again:
        list_for_each_entry_safe(t, tmp, &pre_select_list, pre_select_node) {
                t->pre_select(s, t);
-               if (t->ret > 0 || !t->error_handler)
+               if (t->ret > 0 || !t->event_handler)
                        continue;
-               t->error_handler(t);
+               t->event_handler(t);
                goto again;
        }
 }
@@ -29,9 +29,9 @@ static void sched_post_select(struct sched *s)
 
        list_for_each_entry_safe(t, tmp, &post_select_list, post_select_node) {
                t->post_select(s, t);
-               if (t->ret > 0 || !t->error_handler)
+               if (t->ret > 0 || !t->event_handler)
                        continue;
-               t->error_handler(t);
+               t->event_handler(t);
        }
 }
 
diff --git a/sched.h b/sched.h
index 8ed4cd1..9855475 100644 (file)
--- a/sched.h
+++ b/sched.h
@@ -12,7 +12,7 @@ struct task {
        int ret;
        void (*pre_select)(struct sched *s, struct task *t);
        void (*post_select)(struct sched *s, struct task *t);
-       void (*error_handler)(struct task *t);
+       void (*event_handler)(struct task *t);
        struct list_head pre_select_node;
        struct list_head post_select_node;
        char status[MAXLINE];
diff --git a/write.c b/write.c
index 3e5a97e..7b8ddd6 100644 (file)
--- a/write.c
+++ b/write.c
@@ -157,7 +157,7 @@ out:
        return NULL;
 }
 
-static void idt_error_handler(struct task *t)
+static void idt_event_handler(struct task *t)
 {
        int ret;
 
@@ -174,7 +174,7 @@ static void idt_error_handler(struct task *t)
        }
 }
 
-static void cwt_error_handler(struct task *t)
+static void cwt_event_handler(struct task *t)
 {
        if (t->ret != -E_NO_WAV_HEADER && t->ret != -E_WAV_HEADER_SUCCESS) {
                PARA_ERROR_LOG("%s\n", PARA_STRERROR(-t->ret));
@@ -188,12 +188,12 @@ static void cwt_error_handler(struct task *t)
        }
        idt.task.pre_select = initial_delay_pre_select;
        idt.task.private_data = &idt;
-       idt.task.error_handler = idt_error_handler;
+       idt.task.event_handler = idt_event_handler;
        sprintf(idt.task.status, "initial_delay");
        register_task(&idt.task);
 }
 
-static void stdin_error_handler(struct task *t)
+static void stdin_event_handler(struct task *t)
 {
        unregister_task(t);
        if (t->ret != -E_STDIN_EOF)
@@ -219,14 +219,14 @@ int main(int argc, char *argv[])
        sit.loaded = 0,
        sit.task.pre_select = stdin_pre_select;
        sit.task.post_select = stdin_post_select;
-       sit.task.error_handler = stdin_error_handler;
+       sit.task.event_handler = stdin_event_handler;
        sit.task.private_data = &sit;
        sprintf(sit.task.status, "stdin reader");
        register_task(&sit.task);
 
        cwt.task.pre_select = check_wav_pre_select;
        cwt.task.private_data = &cwt;
-       cwt.task.error_handler = cwt_error_handler;
+       cwt.task.event_handler = cwt_event_handler;
        cwt.buf = sit.buf;
        cwt.loaded = &sit.loaded;
        cwt.eof = &sit.eof;
index 7622c02..0b2772a 100644 (file)
@@ -97,7 +97,7 @@ void wng_close(struct writer_node_group *g)
        }
 }
 
-static void wng_error_handler(struct task *t)
+static void wng_event_handler(struct task *t)
 {
        struct writer_node_group *g = t->private_data;
 
@@ -116,7 +116,7 @@ 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.error_handler = wng_error_handler;
+       g->task.event_handler = wng_event_handler;
        g->task.flags = POST_ADD_TAIL;
        return g;
 }