From f456623ec58197ba986681effcd46dbd4f4a2d18 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Fri, 3 Sep 2010 16:48:31 +0000 Subject: strange off by one fdset count --- src/util/network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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, -- cgit v1.2.3