]> git.tue.mpg.de Git - paraslash.git/commitdiff
dccp_recv: Switch to the alternative post select method.
authorAndre Noll <maan@systemlinux.org>
Sun, 31 Mar 2013 22:45:58 +0000 (22:45 +0000)
committerAndre Noll <maan@systemlinux.org>
Tue, 30 Apr 2013 12:12:45 +0000 (14:12 +0200)
dccp_recv.c

index eb442f303483980aaf49dd31a85876dbcc675f97..7b1f04efd29f6ffb2cbae4ffe05c3ac6f6c0cb65 100644 (file)
@@ -124,7 +124,7 @@ static void dccp_recv_pre_select(struct sched *s, struct task *t)
        para_fd_set(rn->fd, &s->rfds, &s->max_fileno);
 }
 
-static void dccp_recv_post_select(struct sched *s, struct task *t)
+static int dccp_recv_post_select(struct sched *s, struct task *t)
 {
        struct receiver_node *rn = container_of(t, struct receiver_node, task);
        struct btr_node *btrn = rn->btrn;
@@ -152,10 +152,9 @@ static void dccp_recv_post_select(struct sched *s, struct task *t)
                btr_add_output_pool(rn->btrp, num_bytes - iov[0].iov_len, btrn);
        }
 out:
-       if (ret >= 0)
-               return;
-       btr_remove_node(&rn->btrn);
-       t->error = ret;
+       if (ret < 0)
+               btr_remove_node(&rn->btrn);
+       return ret;
 }
 
 static void dccp_recv_free_config(void *conf)
@@ -179,7 +178,8 @@ void dccp_recv_init(struct receiver *r)
        r->open = dccp_recv_open;
        r->close = dccp_recv_close;
        r->pre_select = dccp_recv_pre_select;
-       r->post_select = dccp_recv_post_select;
+       r->post_select = NULL;
+       r->new_post_select = dccp_recv_post_select;
        r->parse_config = dccp_recv_parse_config;
        r->free_config = dccp_recv_free_config;
        r->help = (struct ggo_help) {