audioc: Switch to blocking file descriptors.
[paraslash.git] / dccp_send.c
index 7d8967cca6f9ad47dc5b8578b350fd81d2ad49d8..6248ae80ef784d5739298b61b9494e76d2e769e5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2009 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2010 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -70,9 +70,7 @@ static void dccp_post_select(fd_set *rfds, __a_unused fd_set *wfds)
        struct sender_client *sc;
        int tx_ccid;
 
-       if (dss->listen_fd < 0 || !FD_ISSET(dss->listen_fd, rfds))
-               return;
-       sc = accept_sender_client(dss);
+       sc = accept_sender_client(dss, rfds);
        if (!sc)
                return;
 
@@ -140,12 +138,13 @@ static int dccp_com_allow(struct sender_command_data *scd)
  */
 static const char *dccp_list_available_ccids(void)
 {
-       uint8_t ccids[DCCP_MAX_HOST_CCIDS];
-       uint8_t nccids = sizeof(ccids), i, len;
        /* Worst case length: n * 3 digits + n-1 spaces + '\0' */
        static char list[DCCP_MAX_HOST_CCIDS * 4];
+       uint8_t *ccids;
+       int i, len, nccids;
 
-       if (dccp_available_ccids(ccids, &nccids) == NULL) {
+       nccids = dccp_available_ccids(&ccids);
+       if (nccids < 0) {
                snprintf(list, sizeof(list), "Unable to query available CCIDs");
        } else {
                for (i = len = 0; i < nccids; i++)