off by one
authorChristian Grothoff <christian@grothoff.org>
Wed, 20 Oct 2010 17:49:08 +0000 (17:49 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 20 Oct 2010 17:49:08 +0000 (17:49 +0000)
src/hostlist/hostlist-server.c
src/transport/plugin_transport_http.c

index 87fae74e377cb7496b8e4c4ea7bbdf3514e878d0..d8c8db476cab5c33846f7ac157f4f21a1f59eb0c 100644 (file)
@@ -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,
index 247db29642a062b2cc89790268f48b5494a450d8..ac04610c1f575405513dffd1291750968cb59e77 100644 (file)
@@ -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)