From: Nathan S. Evans Date: Fri, 3 Sep 2010 16:48:31 +0000 (+0000) Subject: strange off by one fdset count X-Git-Tag: initial-import-from-subversion-38251~20464 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f456623ec58197ba986681effcd46dbd4f4a2d18;p=oweals%2Fgnunet.git strange off by one fdset count --- diff --git a/src/util/network.c b/src/util/network.c index 9b96436db..38d9ccb72 100644 --- a/src/util/network.c +++ b/src/util/network.c @@ -56,7 +56,7 @@ struct GNUNET_NETWORK_FDSet { /** - * Maximum number of any socket socket descriptor in the set + * Maximum number of any socket socket descriptor in the set (plus one) */ int nsds; @@ -1007,7 +1007,7 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds, GNUNET_break (0); } #ifndef MINGW - return select (nfds + 1, + return select (nfds, (rfds != NULL) ? &rfds->sds : NULL, (wfds != NULL) ? &wfds->sds : NULL, (efds != NULL) ? &efds->sds : NULL,