X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=dccp_send.c;h=6248ae80ef784d5739298b61b9494e76d2e769e5;hp=7d8967cca6f9ad47dc5b8578b350fd81d2ad49d8;hb=a4f75cecaaee538edb7aae3f0ff19168a1dab59d;hpb=85d8b1b48ef832eaf485709f38cb443e5ecfbb7b diff --git a/dccp_send.c b/dccp_send.c index 7d8967cc..6248ae80 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2009 Andre Noll + * Copyright (C) 2006-2010 Andre Noll * * 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++)