/*
- * Copyright (C) 2005-2012 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2013 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
return -E_RECV_EOF;
}
-static void udp_recv_post_select(__a_unused struct sched *s, struct task *t)
+static int udp_recv_post_select(__a_unused struct sched *s, struct task *t)
{
struct receiver_node *rn = container_of(t, struct receiver_node, task);
struct btr_node *btrn = rn->btrn;
}
ret = readv_ret;
out:
- if (ret >= 0)
- return;
- btr_remove_node(&rn->btrn);
- t->error = ret;
- close(rn->fd);
- rn->fd = -1;
+ if (ret < 0) {
+ btr_remove_node(&rn->btrn);
+ close(rn->fd);
+ rn->fd = -1;
+ }
+ return ret;
}
static void udp_recv_close(struct receiver_node *rn)