X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=dccp_send.c;h=fb2eafc91530f59c2f48605ec7bbcad9a900abd7;hp=7d8967cca6f9ad47dc5b8578b350fd81d2ad49d8;hb=2b46607651851bdf22fe989796fda95cf7b11d1a;hpb=85d8b1b48ef832eaf485709f38cb443e5ecfbb7b diff --git a/dccp_send.c b/dccp_send.c index 7d8967cc..fb2eafc9 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. */ @@ -140,12 +140,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++)