]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - recv.c
convert para_filter to the new scheduler
[paraslash.git] / recv.c
diff --git a/recv.c b/recv.c
index 4b84e8b600cfeeb7d3907c8b292f97c2338730f2..f872fec8b2f5c3ffdb250ad0b06ace34a2a5a904 100644 (file)
--- a/recv.c
+++ b/recv.c
@@ -133,22 +133,14 @@ out:
 
 void rn_event_handler(struct task *t)
 {
-       PARA_ERROR_LOG("%s\n", PARA_STRERROR(-t->ret));
-       unregister_task(t);
-}
-
-void stdout_event_handler(struct task *t)
-{
-       PARA_ERROR_LOG("%s\n", PARA_STRERROR(-t->ret));
+       PARA_NOTICE_LOG("%s\n", PARA_STRERROR(-t->ret));
        unregister_task(t);
 }
 
 int main(int argc, char *argv[])
 {
-       int ret, eof = 0, max, r_opened = 0, receiver_num;
-       struct timeval timeout;
+       int ret, r_opened = 0, receiver_num;
        struct  receiver *r = NULL;
-       fd_set rfds, wfds;
        struct receiver_node rn;
        struct stdout_task sot;
        struct sched s;
@@ -173,12 +165,7 @@ int main(int argc, char *argv[])
                goto out;
        r_opened = 1;
 
-       sot.task.private_data = &sot;
-       sot.task.pre_select = stdout_pre_select;
-       sot.task.post_select = stdout_post_select;
-       sot.task.event_handler = stdout_event_handler;
-       sot.task.flags = 0;
-       sprintf(sot.task.status, "stdout writer");
+       stdout_set_defaults(&sot);
        sot.buf = rn.buf;
        sot.loaded = &rn.loaded;
        sot.eof = &rn.eof;