aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/gnunet-daemon-hostlist.c
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-11-05 18:21:50 +0000
committerNathan S. Evans <evans@in.tum.de>2010-11-05 18:21:50 +0000
commit75a33a1499cf60ea4364c9aa673816629a6c1413 (patch)
tree0620da4312bb04de4d7b65074fdd3b0c3dd6cc0e /src/hostlist/gnunet-daemon-hostlist.c
parent7217c601ad30760872823193d62307e7a335d226 (diff)
downloadgnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.tar.gz
gnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.zip
big scheduler refactoring, expect some issues
Diffstat (limited to 'src/hostlist/gnunet-daemon-hostlist.c')
-rw-r--r--src/hostlist/gnunet-daemon-hostlist.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c
index 52c996aed..f41f0add0 100644
--- a/src/hostlist/gnunet-daemon-hostlist.c
+++ b/src/hostlist/gnunet-daemon-hostlist.c
@@ -235,14 +235,12 @@ cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
235 * Main function that will be run. 235 * Main function that will be run.
236 * 236 *
237 * @param cls closure 237 * @param cls closure
238 * @param sched the scheduler to use
239 * @param args remaining command-line arguments 238 * @param args remaining command-line arguments
240 * @param cfgfile name of the configuration file used (for saving, can be NULL!) 239 * @param cfgfile name of the configuration file used (for saving, can be NULL!)
241 * @param cfg configuration 240 * @param cfg configuration
242 */ 241 */
243static void 242static void
244run (void *cls, 243run (void *cls,
245 struct GNUNET_SCHEDULER_Handle * sched,
246 char *const *args, 244 char *const *args,
247 const char *cfgfile, 245 const char *cfgfile,
248 const struct GNUNET_CONFIGURATION_Handle * cfg) 246 const struct GNUNET_CONFIGURATION_Handle * cfg)
@@ -268,9 +266,9 @@ run (void *cls,
268 266
269 267
270 268
271 stats = GNUNET_STATISTICS_create (sched, "hostlist", cfg); 269 stats = GNUNET_STATISTICS_create ("hostlist", cfg);
272 270
273 core = GNUNET_CORE_connect (sched, cfg, 271 core = GNUNET_CORE_connect (cfg,
274 GNUNET_TIME_UNIT_FOREVER_REL, 272 GNUNET_TIME_UNIT_FOREVER_REL,
275 NULL, 273 NULL,
276 &core_init, 274 &core_init,
@@ -281,18 +279,17 @@ run (void *cls,
281 279
282 if (bootstrapping) 280 if (bootstrapping)
283 { 281 {
284 GNUNET_HOSTLIST_client_start (cfg, sched, stats, 282 GNUNET_HOSTLIST_client_start (cfg, stats,
285 &client_ch, &client_dh, &client_adv_handler, learning); 283 &client_ch, &client_dh, &client_adv_handler, learning);
286 } 284 }
287 285
288 #if HAVE_MHD 286 #if HAVE_MHD
289 if (provide_hostlist) 287 if (provide_hostlist)
290 { 288 {
291 GNUNET_HOSTLIST_server_start (cfg, sched, stats, core, &server_ch, &server_dh, advertising ); 289 GNUNET_HOSTLIST_server_start (cfg, stats, core, &server_ch, &server_dh, advertising );
292 } 290 }
293#endif 291#endif
294 GNUNET_SCHEDULER_add_delayed (sched, 292 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
295 GNUNET_TIME_UNIT_FOREVER_REL,
296 &cleaning_task, NULL); 293 &cleaning_task, NULL);
297 294
298 if (NULL == core) 295 if (NULL == core)
@@ -300,7 +297,7 @@ run (void *cls,
300 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 297 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
301 _("Failed to connect to `%s' service.\n"), 298 _("Failed to connect to `%s' service.\n"),
302 "core"); 299 "core");
303 GNUNET_SCHEDULER_shutdown (sched); 300 GNUNET_SCHEDULER_shutdown ();
304 return; 301 return;
305 } 302 }
306} 303}