From 5ce0118cbd5e8197863f4a1e87e35d99b1823d4d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 20 Oct 2010 17:49:08 +0000 Subject: [PATCH] off by one --- src/hostlist/hostlist-server.c | 6 +++--- src/transport/plugin_transport_http.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hostlist/hostlist-server.c b/src/hostlist/hostlist-server.c index 87fae74e3..d8c8db476 100644 --- a/src/hostlist/hostlist-server.c +++ b/src/hostlist/hostlist-server.c @@ -536,9 +536,9 @@ prepare_daemon (struct MHD_Daemon *daemon_handle) tv.value = (uint64_t) timeout; else tv = GNUNET_TIME_UNIT_FOREVER_REL; - GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max); - GNUNET_NETWORK_fdset_copy_native (wws, &ws, max); - GNUNET_NETWORK_fdset_copy_native (wes, &es, max); + GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max + 1); + GNUNET_NETWORK_fdset_copy_native (wws, &ws, max + 1); + GNUNET_NETWORK_fdset_copy_native (wes, &es, max + 1); ret = GNUNET_SCHEDULER_add_select (sched, GNUNET_SCHEDULER_PRIORITY_HIGH, GNUNET_SCHEDULER_NO_TASK, diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 247db2964..ac04610c1 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -1267,9 +1267,9 @@ http_server_daemon_prepare (struct Plugin *plugin , struct MHD_Daemon *daemon_ha tv.value = (uint64_t) timeout; else tv = GNUNET_TIME_UNIT_SECONDS; - GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max); - GNUNET_NETWORK_fdset_copy_native (wws, &ws, max); - GNUNET_NETWORK_fdset_copy_native (wes, &es, max); + GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max + 1); + GNUNET_NETWORK_fdset_copy_native (wws, &ws, max + 1); + GNUNET_NETWORK_fdset_copy_native (wes, &es, max + 1); if (daemon_handle == plugin->http_server_daemon_v4) { if (plugin->http_server_task_v4 != GNUNET_SCHEDULER_NO_TASK) -- 2.25.1