/**
* Our configuration.
*/
-static struct GNUNET_CONFIGURATION_Handle *cfg;
+static const struct GNUNET_CONFIGURATION_Handle *cfg;
/**
* Our scheduler.
size_t s;
if (peer == NULL)
- finish_response (results);
+ {
+ finish_response (results);
+ return;
+ }
old = results->size;
s = GNUNET_HELLO_size(hello);
if (old + s >= GNUNET_MAX_MALLOC_CHECKED)
fd_set rs;
fd_set ws;
fd_set es;
+ struct GNUNET_NETWORK_FDSet *wrs;
+ struct GNUNET_NETWORK_FDSet *wws;
+ struct GNUNET_NETWORK_FDSet *wes;
int max;
unsigned long long timeout;
int haveto;
FD_ZERO(&rs);
FD_ZERO(&ws);
FD_ZERO(&es);
+ wrs = GNUNET_NETWORK_fdset_create ();
+ wes = GNUNET_NETWORK_fdset_create ();
+ wws = GNUNET_NETWORK_fdset_create ();
max = -1;
GNUNET_assert (MHD_YES ==
MHD_get_fdset (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);
hostlist_task
= GNUNET_SCHEDULER_add_select (sched,
GNUNET_NO,
GNUNET_SCHEDULER_PRIORITY_HIGH,
GNUNET_SCHEDULER_NO_TASK,
tv,
- max,
- &rs,
- &ws,
+ wrs,
+ wws,
&run_daemon,
NULL);
+ GNUNET_NETWORK_fdset_destroy (wrs);
+ GNUNET_NETWORK_fdset_destroy (wws);
+ GNUNET_NETWORK_fdset_destroy (wes);
}
* @return GNUNET_OK on success
*/
int
-GNUNET_HOSTLIST_server_start (struct GNUNET_CONFIGURATION_Handle *c,
+GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c,
struct GNUNET_SCHEDULER_Handle *s,
struct GNUNET_STATISTICS_Handle *st)
{