*/
static struct GNUNET_DHT_Handle *dht_handle;
-/**
- * Global handle of the scheduler
- */
-static struct GNUNET_SCHEDULER_Handle *sched;
/**
* Global handle of the configuration
GNUNET_DHT_find_peer_stop (find_peer_handle);
find_peer_handle = NULL;
}
- GNUNET_SCHEDULER_add_now (sched, &shutdown_task, NULL);
+ GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
}
/**
* Main function that will be run by the scheduler.
*
* @param cls closure
- * @param s the scheduler to use
* @param args remaining command-line arguments
* @param cfgfile name of the configuration file used (for saving, can be NULL!)
* @param c configuration
*/
static void
run (void *cls,
- struct GNUNET_SCHEDULER_Handle *s,
char *const *args,
const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
{
struct GNUNET_TIME_Relative timeout;
GNUNET_HashCode key;
- sched = s;
cfg = c;
if (query_key == NULL)
return;
}
- dht_handle = GNUNET_DHT_connect (sched, cfg, 1);
+ dht_handle = GNUNET_DHT_connect (cfg, 1);
if (dht_handle == NULL)
{
NULL);
if (NULL == find_peer_handle)
{
- GNUNET_SCHEDULER_add_now (sched, &shutdown_task, NULL);
+ GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
return;
}
- GNUNET_SCHEDULER_add_delayed (sched,
- GNUNET_TIME_absolute_get_remaining
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining
(absolute_timeout),
&cleanup_task, NULL);
}