From: Andre Noll Date: Sun, 31 Mar 2013 22:45:58 +0000 (+0000) Subject: dccp_recv: Switch to the alternative post select method. X-Git-Tag: v0.4.13~39^2~39 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=b333e042568b41c06672960534d9f0a092c0bb26;p=paraslash.git dccp_recv: Switch to the alternative post select method. --- diff --git a/dccp_recv.c b/dccp_recv.c index eb442f30..7b1f04ef 100644 --- a/dccp_recv.c +++ b/dccp_recv.c @@ -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) {