audiod: Dump audiod status after command execution.
[paraslash.git] / udp_recv.c
index c768d3243ead5fa5e8be4c68ba276cc2193a7a49..00ad3e2781745c2e04af80dc462b75171e380dd0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2010 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -84,6 +84,9 @@ static void udp_recv_post_select(__a_unused struct sched *s, struct task *t)
        if (iovcnt == 0)
                goto err;
        ret = para_readv(purd->fd, iov, iovcnt);
+       /* EAGAIN is possible even if FD_ISSET */
+       if (ret < 0 && is_errno(-ret, EAGAIN))
+               return;
        if (ret == 0)
                ret = -E_RECV_EOF;
        if (ret < 0)
@@ -209,7 +212,7 @@ static int udp_recv_open(struct receiver_node *rn)
        ret = mcast_receiver_setup(purd->fd, iface);
        if (ret < 0) {
                close(purd->fd);
-               return ret;
+               goto err;
        }
 
        ret = mark_fd_nonblocking(purd->fd);