diff options
Diffstat (limited to 'src/hostlist/hostlist-server.c')
-rw-r--r-- | src/hostlist/hostlist-server.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/hostlist/hostlist-server.c b/src/hostlist/hostlist-server.c index 8fdee5545..1c85f8f75 100644 --- a/src/hostlist/hostlist-server.c +++ b/src/hostlist/hostlist-server.c | |||
@@ -50,11 +50,6 @@ static struct MHD_Daemon *daemon_handle_v4; | |||
50 | static const struct GNUNET_CONFIGURATION_Handle *cfg; | 50 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * Our scheduler. | ||
54 | */ | ||
55 | static struct GNUNET_SCHEDULER_Handle *sched; | ||
56 | |||
57 | /** | ||
58 | * For keeping statistics. | 53 | * For keeping statistics. |
59 | */ | 54 | */ |
60 | static struct GNUNET_STATISTICS_Handle *stats; | 55 | static struct GNUNET_STATISTICS_Handle *stats; |
@@ -539,8 +534,7 @@ prepare_daemon (struct MHD_Daemon *daemon_handle) | |||
539 | GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max + 1); | 534 | GNUNET_NETWORK_fdset_copy_native (wrs, &rs, max + 1); |
540 | GNUNET_NETWORK_fdset_copy_native (wws, &ws, max + 1); | 535 | GNUNET_NETWORK_fdset_copy_native (wws, &ws, max + 1); |
541 | GNUNET_NETWORK_fdset_copy_native (wes, &es, max + 1); | 536 | GNUNET_NETWORK_fdset_copy_native (wes, &es, max + 1); |
542 | ret = GNUNET_SCHEDULER_add_select (sched, | 537 | ret = GNUNET_SCHEDULER_add_select (GNUNET_SCHEDULER_PRIORITY_HIGH, |
543 | GNUNET_SCHEDULER_PRIORITY_HIGH, | ||
544 | GNUNET_SCHEDULER_NO_TASK, | 538 | GNUNET_SCHEDULER_NO_TASK, |
545 | tv, | 539 | tv, |
546 | wrs, | 540 | wrs, |
@@ -562,7 +556,6 @@ prepare_daemon (struct MHD_Daemon *daemon_handle) | |||
562 | */ | 556 | */ |
563 | int | 557 | int |
564 | GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c, | 558 | GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c, |
565 | struct GNUNET_SCHEDULER_Handle *s, | ||
566 | struct GNUNET_STATISTICS_Handle *st, | 559 | struct GNUNET_STATISTICS_Handle *st, |
567 | struct GNUNET_CORE_Handle *co, | 560 | struct GNUNET_CORE_Handle *co, |
568 | GNUNET_CORE_ConnectEventHandler *server_ch, | 561 | GNUNET_CORE_ConnectEventHandler *server_ch, |
@@ -580,10 +573,9 @@ GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c, | |||
580 | else | 573 | else |
581 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 574 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
582 | "Advertising enabled on this hostlist server\n"); | 575 | "Advertising enabled on this hostlist server\n"); |
583 | sched = s; | ||
584 | cfg = c; | 576 | cfg = c; |
585 | stats = st; | 577 | stats = st; |
586 | peerinfo = GNUNET_PEERINFO_connect (sched, cfg); | 578 | peerinfo = GNUNET_PEERINFO_connect (cfg); |
587 | if (peerinfo == NULL) | 579 | if (peerinfo == NULL) |
588 | { | 580 | { |
589 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 581 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -682,7 +674,7 @@ GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c, | |||
682 | if (daemon_handle_v6 != NULL) | 674 | if (daemon_handle_v6 != NULL) |
683 | hostlist_task_v6 = prepare_daemon (daemon_handle_v6); | 675 | hostlist_task_v6 = prepare_daemon (daemon_handle_v6); |
684 | 676 | ||
685 | notify = GNUNET_PEERINFO_notify ( cfg, sched, process_notify, NULL); | 677 | notify = GNUNET_PEERINFO_notify ( cfg, process_notify, NULL); |
686 | 678 | ||
687 | return GNUNET_OK; | 679 | return GNUNET_OK; |
688 | } | 680 | } |
@@ -704,12 +696,12 @@ GNUNET_HOSTLIST_server_stop () | |||
704 | } | 696 | } |
705 | if (GNUNET_SCHEDULER_NO_TASK != hostlist_task_v6) | 697 | if (GNUNET_SCHEDULER_NO_TASK != hostlist_task_v6) |
706 | { | 698 | { |
707 | GNUNET_SCHEDULER_cancel (sched, hostlist_task_v6); | 699 | GNUNET_SCHEDULER_cancel (hostlist_task_v6); |
708 | hostlist_task_v6 = GNUNET_SCHEDULER_NO_TASK; | 700 | hostlist_task_v6 = GNUNET_SCHEDULER_NO_TASK; |
709 | } | 701 | } |
710 | if (GNUNET_SCHEDULER_NO_TASK != hostlist_task_v4) | 702 | if (GNUNET_SCHEDULER_NO_TASK != hostlist_task_v4) |
711 | { | 703 | { |
712 | GNUNET_SCHEDULER_cancel (sched, hostlist_task_v4); | 704 | GNUNET_SCHEDULER_cancel (hostlist_task_v4); |
713 | hostlist_task_v4 = GNUNET_SCHEDULER_NO_TASK; | 705 | hostlist_task_v4 = GNUNET_SCHEDULER_NO_TASK; |
714 | } | 706 | } |
715 | if (pitr != NULL) | 707 | if (pitr != NULL) |
@@ -738,7 +730,6 @@ GNUNET_HOSTLIST_server_stop () | |||
738 | peerinfo = NULL; | 730 | peerinfo = NULL; |
739 | } | 731 | } |
740 | cfg = NULL; | 732 | cfg = NULL; |
741 | sched = NULL; | ||
742 | stats = NULL; | 733 | stats = NULL; |
743 | core = NULL; | 734 | core = NULL; |
744 | } | 735 | } |