]> git.tue.mpg.de Git - paraslash.git/commitdiff
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 6233e40b950b3916c581882479461050cdd10551..9db7c092e0209ac542283980773a9519a4f3b49a 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 8ed4cd126f73e87cfb2aefc5385856200eedbedd..9855475d0a7311708306417a77fca071d238ef4c 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 3e5a97e8076e9a3d70bbb0d5386ee9b605a4cae7..7b8ddd6644b9251e9fe24971b22d7c63e95908bd 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 7622c020024b7545353616f6acdc2431b1e742a5..0b2772ae8ea4d6928b828aa8bb2e2c5916833309 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;
 }