audiod: Avoid to report 100% time at startup.
[paraslash.git] / udp_recv.c
index 96b6c73123acba4da30e34e9d50850cfa7b554ac..b803b4976b52d0e89fdae2c3ee7edbdb8a0a311b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2013 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005 Andre Noll <maan@tuebingen.mpg.de>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 #include "net.h"
 #include "fd.h"
 
-static void udp_recv_pre_select(struct sched *s, struct task *t)
+static void udp_recv_pre_select(struct sched *s, void *context)
 {
-       struct receiver_node *rn = container_of(t, struct receiver_node, task);
+       struct receiver_node *rn = context;
 
-       if (generic_recv_pre_select(s, t) <= 0)
+       if (generic_recv_pre_select(s, rn) <= 0)
                return;
        para_fd_set(rn->fd, &s->rfds, &s->max_fileno);
 }
@@ -54,15 +54,15 @@ static int udp_check_eof(size_t sz, struct iovec iov[2])
        return -E_RECV_EOF;
 }
 
-static int udp_recv_post_select(__a_unused struct sched *s, struct task *t)
+static int udp_recv_post_select(__a_unused struct sched *s, void *context)
 {
-       struct receiver_node *rn = container_of(t, struct receiver_node, task);
+       struct receiver_node *rn = context;
        struct btr_node *btrn = rn->btrn;
        size_t num_bytes;
        struct iovec iov[2];
        int ret, readv_ret, iovcnt;
 
-       ret = task_get_notification(t);
+       ret = task_get_notification(rn->task);
        if (ret < 0)
                goto out;
        ret = btr_node_status(btrn, 0, BTR_NT_ROOT);