diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-11-05 18:21:50 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-11-05 18:21:50 +0000 |
commit | 75a33a1499cf60ea4364c9aa673816629a6c1413 (patch) | |
tree | 0620da4312bb04de4d7b65074fdd3b0c3dd6cc0e /src/dv | |
parent | 7217c601ad30760872823193d62307e7a335d226 (diff) | |
download | gnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.tar.gz gnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.zip |
big scheduler refactoring, expect some issues
Diffstat (limited to 'src/dv')
-rw-r--r-- | src/dv/dv.h | 3 | ||||
-rw-r--r-- | src/dv/dv_api.c | 13 | ||||
-rw-r--r-- | src/dv/gnunet-service-dv.c | 56 | ||||
-rw-r--r-- | src/dv/plugin_transport_dv.c | 2 | ||||
-rw-r--r-- | src/dv/test_transport_api_dv.c | 103 |
5 files changed, 71 insertions, 106 deletions
diff --git a/src/dv/dv.h b/src/dv/dv.h index 9916e1056..10b531ced 100644 --- a/src/dv/dv.h +++ b/src/dv/dv.h | |||
@@ -258,8 +258,7 @@ typedef struct | |||
258 | 258 | ||
259 | 259 | ||
260 | struct GNUNET_DV_Handle * | 260 | struct GNUNET_DV_Handle * |
261 | GNUNET_DV_connect (struct GNUNET_SCHEDULER_Handle *sched, | 261 | GNUNET_DV_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
262 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
263 | GNUNET_DV_MessageReceivedHandler receive_handler, | 262 | GNUNET_DV_MessageReceivedHandler receive_handler, |
264 | void *receive_handler_cls); | 263 | void *receive_handler_cls); |
265 | 264 | ||
diff --git a/src/dv/dv_api.c b/src/dv/dv_api.c index d9aef03c8..28c66af41 100644 --- a/src/dv/dv_api.c +++ b/src/dv/dv_api.c | |||
@@ -65,10 +65,6 @@ struct PendingMessages | |||
65 | */ | 65 | */ |
66 | struct GNUNET_DV_Handle | 66 | struct GNUNET_DV_Handle |
67 | { | 67 | { |
68 | /** | ||
69 | * Our scheduler. | ||
70 | */ | ||
71 | struct GNUNET_SCHEDULER_Handle *sched; | ||
72 | 68 | ||
73 | /** | 69 | /** |
74 | * Configuration to use. | 70 | * Configuration to use. |
@@ -175,7 +171,7 @@ try_connect (struct GNUNET_DV_Handle *ret) | |||
175 | { | 171 | { |
176 | if (ret->client != NULL) | 172 | if (ret->client != NULL) |
177 | return GNUNET_OK; | 173 | return GNUNET_OK; |
178 | ret->client = GNUNET_CLIENT_connect (ret->sched, "dv", ret->cfg); | 174 | ret->client = GNUNET_CLIENT_connect ("dv", ret->cfg); |
179 | if (ret->client != NULL) | 175 | if (ret->client != NULL) |
180 | return GNUNET_YES; | 176 | return GNUNET_YES; |
181 | #if DEBUG_DV_MESSAGES | 177 | #if DEBUG_DV_MESSAGES |
@@ -529,7 +525,6 @@ transmit_start (void *cls, size_t size, void *buf) | |||
529 | /** | 525 | /** |
530 | * Connect to the DV service | 526 | * Connect to the DV service |
531 | * | 527 | * |
532 | * @param sched the scheduler to use | ||
533 | * @param cfg the configuration to use | 528 | * @param cfg the configuration to use |
534 | * @param receive_handler method call when on receipt from the service | 529 | * @param receive_handler method call when on receipt from the service |
535 | * @param receive_handler_cls closure for receive_handler | 530 | * @param receive_handler_cls closure for receive_handler |
@@ -537,8 +532,7 @@ transmit_start (void *cls, size_t size, void *buf) | |||
537 | * @return handle to the DV service | 532 | * @return handle to the DV service |
538 | */ | 533 | */ |
539 | struct GNUNET_DV_Handle * | 534 | struct GNUNET_DV_Handle * |
540 | GNUNET_DV_connect (struct GNUNET_SCHEDULER_Handle *sched, | 535 | GNUNET_DV_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
541 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
542 | GNUNET_DV_MessageReceivedHandler receive_handler, | 536 | GNUNET_DV_MessageReceivedHandler receive_handler, |
543 | void *receive_handler_cls) | 537 | void *receive_handler_cls) |
544 | { | 538 | { |
@@ -548,11 +542,10 @@ GNUNET_DV_connect (struct GNUNET_SCHEDULER_Handle *sched, | |||
548 | handle = GNUNET_malloc(sizeof(struct GNUNET_DV_Handle)); | 542 | handle = GNUNET_malloc(sizeof(struct GNUNET_DV_Handle)); |
549 | 543 | ||
550 | handle->cfg = cfg; | 544 | handle->cfg = cfg; |
551 | handle->sched = sched; | ||
552 | handle->pending_list = NULL; | 545 | handle->pending_list = NULL; |
553 | handle->current = NULL; | 546 | handle->current = NULL; |
554 | handle->th = NULL; | 547 | handle->th = NULL; |
555 | handle->client = GNUNET_CLIENT_connect(sched, "dv", cfg); | 548 | handle->client = GNUNET_CLIENT_connect("dv", cfg); |
556 | handle->receive_handler = receive_handler; | 549 | handle->receive_handler = receive_handler; |
557 | handle->receive_cls = receive_handler_cls; | 550 | handle->receive_cls = receive_handler_cls; |
558 | 551 | ||
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index 2d91bce41..cfc1cd2d1 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c | |||
@@ -565,10 +565,6 @@ static struct GNUNET_PeerIdentity my_identity; | |||
565 | */ | 565 | */ |
566 | static const struct GNUNET_CONFIGURATION_Handle *cfg; | 566 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
567 | 567 | ||
568 | /** | ||
569 | * The scheduler for this service. | ||
570 | */ | ||
571 | static struct GNUNET_SCHEDULER_Handle *sched; | ||
572 | 568 | ||
573 | /** | 569 | /** |
574 | * The client, the DV plugin connected to us. Hopefully | 570 | * The client, the DV plugin connected to us. Hopefully |
@@ -944,7 +940,7 @@ size_t core_transmit_notify (void *cls, | |||
944 | } | 940 | } |
945 | /*reply = core_pending_head;*/ | 941 | /*reply = core_pending_head;*/ |
946 | 942 | ||
947 | GNUNET_SCHEDULER_add_now(sched, &try_core_send, NULL); | 943 | GNUNET_SCHEDULER_add_now(&try_core_send, NULL); |
948 | /*if (reply != NULL) | 944 | /*if (reply != NULL) |
949 | core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, reply->importance, reply->timeout, &reply->recipient, reply->msg_size, &core_transmit_notify, NULL);*/ | 945 | core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, reply->importance, reply->timeout, &reply->recipient, reply->msg_size, &core_transmit_notify, NULL);*/ |
950 | 946 | ||
@@ -1043,7 +1039,7 @@ send_message_via (const struct GNUNET_PeerIdentity *sender, | |||
1043 | core_pending_tail, | 1039 | core_pending_tail, |
1044 | pending_message); | 1040 | pending_message); |
1045 | 1041 | ||
1046 | GNUNET_SCHEDULER_add_now(sched, try_core_send, NULL); | 1042 | GNUNET_SCHEDULER_add_now(try_core_send, NULL); |
1047 | 1043 | ||
1048 | return GNUNET_YES; | 1044 | return GNUNET_YES; |
1049 | } | 1045 | } |
@@ -1199,7 +1195,7 @@ send_message (const struct GNUNET_PeerIdentity * recipient, | |||
1199 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: Notifying core of send size %d to destination `%s'\n", "DV SEND MESSAGE", msg_size, GNUNET_i2s(recipient)); | 1195 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: Notifying core of send size %d to destination `%s'\n", "DV SEND MESSAGE", msg_size, GNUNET_i2s(recipient)); |
1200 | #endif | 1196 | #endif |
1201 | 1197 | ||
1202 | GNUNET_SCHEDULER_add_now(sched, try_core_send, NULL); | 1198 | GNUNET_SCHEDULER_add_now(try_core_send, NULL); |
1203 | return (int) cost; | 1199 | return (int) cost; |
1204 | } | 1200 | } |
1205 | 1201 | ||
@@ -1514,7 +1510,7 @@ static int handle_dv_data_message (void *cls, | |||
1514 | memcpy(delayed_context->message, packed_message, packed_message_size); | 1510 | memcpy(delayed_context->message, packed_message, packed_message_size); |
1515 | delayed_context->message_size = packed_message_size; | 1511 | delayed_context->message_size = packed_message_size; |
1516 | delayed_context->uid = ntohl(incoming->uid); | 1512 | delayed_context->uid = ntohl(incoming->uid); |
1517 | GNUNET_SCHEDULER_add_delayed(sched, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 2500), &send_message_delayed, delayed_context); | 1513 | GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 2500), &send_message_delayed, delayed_context); |
1518 | return GNUNET_OK; | 1514 | return GNUNET_OK; |
1519 | } | 1515 | } |
1520 | else | 1516 | else |
@@ -1669,7 +1665,7 @@ neighbor_send_task (void *cls, | |||
1669 | core_pending_tail, | 1665 | core_pending_tail, |
1670 | pending_message); | 1666 | pending_message); |
1671 | 1667 | ||
1672 | GNUNET_SCHEDULER_add_now(sched, try_core_send, NULL); | 1668 | GNUNET_SCHEDULER_add_now(try_core_send, NULL); |
1673 | /*if (core_transmit_handle == NULL) | 1669 | /*if (core_transmit_handle == NULL) |
1674 | core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, default_dv_priority, GNUNET_TIME_relative_get_forever(), &to->identity, sizeof(p2p_dv_MESSAGE_NeighborInfo), &core_transmit_notify, NULL);*/ | 1670 | core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, default_dv_priority, GNUNET_TIME_relative_get_forever(), &to->identity, sizeof(p2p_dv_MESSAGE_NeighborInfo), &core_transmit_notify, NULL);*/ |
1675 | 1671 | ||
@@ -1680,14 +1676,14 @@ neighbor_send_task (void *cls, | |||
1680 | #if DEBUG_DV_PEER_NUMBERS | 1676 | #if DEBUG_DV_PEER_NUMBERS |
1681 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "DV SERVICE: still in fast send mode\n"); | 1677 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "DV SERVICE: still in fast send mode\n"); |
1682 | #endif | 1678 | #endif |
1683 | send_context->task = GNUNET_SCHEDULER_add_now(sched, &neighbor_send_task, send_context); | 1679 | send_context->task = GNUNET_SCHEDULER_add_now(&neighbor_send_task, send_context); |
1684 | } | 1680 | } |
1685 | else | 1681 | else |
1686 | { | 1682 | { |
1687 | #if DEBUG_DV_PEER_NUMBERS | 1683 | #if DEBUG_DV_PEER_NUMBERS |
1688 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "DV SERVICE: entering slow send mode\n"); | 1684 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "DV SERVICE: entering slow send mode\n"); |
1689 | #endif | 1685 | #endif |
1690 | send_context->task = GNUNET_SCHEDULER_add_delayed(sched, GNUNET_DV_DEFAULT_SEND_INTERVAL, &neighbor_send_task, send_context); | 1686 | send_context->task = GNUNET_SCHEDULER_add_delayed(GNUNET_DV_DEFAULT_SEND_INTERVAL, &neighbor_send_task, send_context); |
1691 | } | 1687 | } |
1692 | 1688 | ||
1693 | return; | 1689 | return; |
@@ -1994,7 +1990,7 @@ direct_neighbor_free (struct DirectNeighbor *direct) | |||
1994 | send_context = direct->send_context; | 1990 | send_context = direct->send_context; |
1995 | 1991 | ||
1996 | if (send_context->task != GNUNET_SCHEDULER_NO_TASK) | 1992 | if (send_context->task != GNUNET_SCHEDULER_NO_TASK) |
1997 | GNUNET_SCHEDULER_cancel(sched, send_context->task); | 1993 | GNUNET_SCHEDULER_cancel(send_context->task); |
1998 | 1994 | ||
1999 | about_list = send_context->fast_gossip_list_head; | 1995 | about_list = send_context->fast_gossip_list_head; |
2000 | while (about_list != NULL) | 1996 | while (about_list != NULL) |
@@ -2047,7 +2043,7 @@ static int schedule_disconnect_messages (void *cls, | |||
2047 | core_pending_tail, | 2043 | core_pending_tail, |
2048 | pending_message); | 2044 | pending_message); |
2049 | 2045 | ||
2050 | GNUNET_SCHEDULER_add_now(sched, try_core_send, NULL); | 2046 | GNUNET_SCHEDULER_add_now(try_core_send, NULL); |
2051 | /*if (core_transmit_handle == NULL) | 2047 | /*if (core_transmit_handle == NULL) |
2052 | core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, default_dv_priority, GNUNET_TIME_relative_get_forever(), ¬ify->identity, sizeof(p2p_dv_MESSAGE_Disconnect), &core_transmit_notify, NULL);*/ | 2048 | core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, default_dv_priority, GNUNET_TIME_relative_get_forever(), ¬ify->identity, sizeof(p2p_dv_MESSAGE_Disconnect), &core_transmit_notify, NULL);*/ |
2053 | 2049 | ||
@@ -2133,8 +2129,8 @@ void core_init (void *cls, | |||
2133 | 2129 | ||
2134 | if (server == NULL) | 2130 | if (server == NULL) |
2135 | { | 2131 | { |
2136 | GNUNET_SCHEDULER_cancel(sched, cleanup_task); | 2132 | GNUNET_SCHEDULER_cancel(cleanup_task); |
2137 | GNUNET_SCHEDULER_add_now(sched, &shutdown_task, NULL); | 2133 | GNUNET_SCHEDULER_add_now(&shutdown_task, NULL); |
2138 | return; | 2134 | return; |
2139 | } | 2135 | } |
2140 | #if DEBUG_DV | 2136 | #if DEBUG_DV |
@@ -2265,9 +2261,9 @@ static int add_distant_all_direct_neighbors (void *cls, | |||
2265 | GNUNET_free(encPeerTo); | 2261 | GNUNET_free(encPeerTo); |
2266 | #endif | 2262 | #endif |
2267 | /*if (send_context->task != GNUNET_SCHEDULER_NO_TASK) | 2263 | /*if (send_context->task != GNUNET_SCHEDULER_NO_TASK) |
2268 | GNUNET_SCHEDULER_cancel(sched, send_context->task);*/ | 2264 | GNUNET_SCHEDULER_cancel(send_context->task);*/ |
2269 | 2265 | ||
2270 | send_context->task = GNUNET_SCHEDULER_add_now(sched, &neighbor_send_task, send_context); | 2266 | send_context->task = GNUNET_SCHEDULER_add_now(&neighbor_send_task, send_context); |
2271 | return GNUNET_YES; | 2267 | return GNUNET_YES; |
2272 | } | 2268 | } |
2273 | 2269 | ||
@@ -2673,9 +2669,9 @@ static int gossip_all_to_all_iterator (void *cls, | |||
2673 | GNUNET_CONTAINER_multihashmap_iterate (extended_neighbors, &add_all_extended_peers, direct->send_context); | 2669 | GNUNET_CONTAINER_multihashmap_iterate (extended_neighbors, &add_all_extended_peers, direct->send_context); |
2674 | 2670 | ||
2675 | if (direct->send_context->task != GNUNET_SCHEDULER_NO_TASK) | 2671 | if (direct->send_context->task != GNUNET_SCHEDULER_NO_TASK) |
2676 | GNUNET_SCHEDULER_cancel(sched, direct->send_context->task); | 2672 | GNUNET_SCHEDULER_cancel(direct->send_context->task); |
2677 | 2673 | ||
2678 | direct->send_context->task = GNUNET_SCHEDULER_add_now(sched, &neighbor_send_task, direct->send_context); | 2674 | direct->send_context->task = GNUNET_SCHEDULER_add_now(&neighbor_send_task, direct->send_context); |
2679 | return GNUNET_YES; | 2675 | return GNUNET_YES; |
2680 | } | 2676 | } |
2681 | 2677 | ||
@@ -2691,8 +2687,7 @@ gossip_all_to_all (void *cls, | |||
2691 | { | 2687 | { |
2692 | GNUNET_CONTAINER_multihashmap_iterate (direct_neighbors, &gossip_all_to_all_iterator, NULL); | 2688 | GNUNET_CONTAINER_multihashmap_iterate (direct_neighbors, &gossip_all_to_all_iterator, NULL); |
2693 | 2689 | ||
2694 | GNUNET_SCHEDULER_add_delayed (sched, | 2690 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5), |
2695 | GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5), | ||
2696 | &gossip_all_to_all, | 2691 | &gossip_all_to_all, |
2697 | NULL); | 2692 | NULL); |
2698 | 2693 | ||
@@ -2749,9 +2744,9 @@ static int add_all_direct_neighbors (void *cls, | |||
2749 | send_context->fast_gossip_list_tail, | 2744 | send_context->fast_gossip_list_tail, |
2750 | gossip_entry); | 2745 | gossip_entry); |
2751 | if (send_context->task != GNUNET_SCHEDULER_NO_TASK) | 2746 | if (send_context->task != GNUNET_SCHEDULER_NO_TASK) |
2752 | GNUNET_SCHEDULER_cancel(sched, send_context->task); | 2747 | GNUNET_SCHEDULER_cancel(send_context->task); |
2753 | 2748 | ||
2754 | send_context->task = GNUNET_SCHEDULER_add_now(sched, &neighbor_send_task, send_context); | 2749 | send_context->task = GNUNET_SCHEDULER_add_now(&neighbor_send_task, send_context); |
2755 | //tc.reason = GNUNET_SCHEDULER_REASON_TIMEOUT; | 2750 | //tc.reason = GNUNET_SCHEDULER_REASON_TIMEOUT; |
2756 | //neighbor_send_task(send_context, &tc); | 2751 | //neighbor_send_task(send_context, &tc); |
2757 | return GNUNET_YES; | 2752 | return GNUNET_YES; |
@@ -2827,7 +2822,7 @@ process_peerinfo (void *cls, | |||
2827 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: Gossipped about %s to %d direct peers\n", GNUNET_i2s(&my_identity), neighbor_pid, sent); | 2822 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: Gossipped about %s to %d direct peers\n", GNUNET_i2s(&my_identity), neighbor_pid, sent); |
2828 | GNUNET_free(neighbor_pid); | 2823 | GNUNET_free(neighbor_pid); |
2829 | #endif | 2824 | #endif |
2830 | neighbor->send_context->task = GNUNET_SCHEDULER_add_now(sched, &neighbor_send_task, neighbor->send_context); | 2825 | neighbor->send_context->task = GNUNET_SCHEDULER_add_now(&neighbor_send_task, neighbor->send_context); |
2831 | } | 2826 | } |
2832 | } | 2827 | } |
2833 | 2828 | ||
@@ -2951,7 +2946,7 @@ void handle_core_disconnect (void *cls, | |||
2951 | GNUNET_break(0); | 2946 | GNUNET_break(0); |
2952 | } | 2947 | } |
2953 | if ((neighbor->send_context != NULL) && (neighbor->send_context->task != GNUNET_SCHEDULER_NO_TASK)) | 2948 | if ((neighbor->send_context != NULL) && (neighbor->send_context->task != GNUNET_SCHEDULER_NO_TASK)) |
2954 | GNUNET_SCHEDULER_cancel(sched, neighbor->send_context->task); | 2949 | GNUNET_SCHEDULER_cancel(neighbor->send_context->task); |
2955 | GNUNET_free (neighbor); | 2950 | GNUNET_free (neighbor); |
2956 | } | 2951 | } |
2957 | 2952 | ||
@@ -2960,18 +2955,15 @@ void handle_core_disconnect (void *cls, | |||
2960 | * Process dv requests. | 2955 | * Process dv requests. |
2961 | * | 2956 | * |
2962 | * @param cls closure | 2957 | * @param cls closure |
2963 | * @param scheduler scheduler to use | ||
2964 | * @param server the initialized server | 2958 | * @param server the initialized server |
2965 | * @param c configuration to use | 2959 | * @param c configuration to use |
2966 | */ | 2960 | */ |
2967 | static void | 2961 | static void |
2968 | run (void *cls, | 2962 | run (void *cls, |
2969 | struct GNUNET_SCHEDULER_Handle *scheduler, | ||
2970 | struct GNUNET_SERVER_Handle *server, | 2963 | struct GNUNET_SERVER_Handle *server, |
2971 | const struct GNUNET_CONFIGURATION_Handle *c) | 2964 | const struct GNUNET_CONFIGURATION_Handle *c) |
2972 | { | 2965 | { |
2973 | unsigned long long max_hosts; | 2966 | unsigned long long max_hosts; |
2974 | sched = scheduler; | ||
2975 | cfg = c; | 2967 | cfg = c; |
2976 | 2968 | ||
2977 | /* FIXME: Read from config, or calculate, or something other than this! */ | 2969 | /* FIXME: Read from config, or calculate, or something other than this! */ |
@@ -3000,8 +2992,7 @@ run (void *cls, | |||
3000 | 2992 | ||
3001 | GNUNET_SERVER_add_handlers (server, plugin_handlers); | 2993 | GNUNET_SERVER_add_handlers (server, plugin_handlers); |
3002 | coreAPI = | 2994 | coreAPI = |
3003 | GNUNET_CORE_connect (sched, | 2995 | GNUNET_CORE_connect (cfg, |
3004 | cfg, | ||
3005 | GNUNET_TIME_relative_get_forever(), | 2996 | GNUNET_TIME_relative_get_forever(), |
3006 | NULL, /* FIXME: anything we want to pass around? */ | 2997 | NULL, /* FIXME: anything we want to pass around? */ |
3007 | &core_init, | 2998 | &core_init, |
@@ -3020,7 +3011,7 @@ run (void *cls, | |||
3020 | coreMST = GNUNET_SERVER_mst_create (&tokenized_message_handler, | 3011 | coreMST = GNUNET_SERVER_mst_create (&tokenized_message_handler, |
3021 | NULL); | 3012 | NULL); |
3022 | 3013 | ||
3023 | peerinfo_handle = GNUNET_PEERINFO_connect(sched, cfg); | 3014 | peerinfo_handle = GNUNET_PEERINFO_connect(cfg); |
3024 | 3015 | ||
3025 | if (peerinfo_handle == NULL) | 3016 | if (peerinfo_handle == NULL) |
3026 | { | 3017 | { |
@@ -3029,8 +3020,7 @@ run (void *cls, | |||
3029 | } | 3020 | } |
3030 | 3021 | ||
3031 | /* Scheduled the task to clean up when shutdown is called */ | 3022 | /* Scheduled the task to clean up when shutdown is called */ |
3032 | cleanup_task = GNUNET_SCHEDULER_add_delayed (sched, | 3023 | cleanup_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
3033 | GNUNET_TIME_UNIT_FOREVER_REL, | ||
3034 | &shutdown_task, | 3024 | &shutdown_task, |
3035 | NULL); | 3025 | NULL); |
3036 | } | 3026 | } |
diff --git a/src/dv/plugin_transport_dv.c b/src/dv/plugin_transport_dv.c index 41f3a5140..b7616d2ac 100644 --- a/src/dv/plugin_transport_dv.c +++ b/src/dv/plugin_transport_dv.c | |||
@@ -389,7 +389,7 @@ libgnunet_plugin_transport_dv_init (void *cls) | |||
389 | plugin = GNUNET_malloc (sizeof (struct Plugin)); | 389 | plugin = GNUNET_malloc (sizeof (struct Plugin)); |
390 | plugin->env = env; | 390 | plugin->env = env; |
391 | 391 | ||
392 | plugin->dv_handle = GNUNET_DV_connect(env->sched, env->cfg, &handle_dv_message_received, plugin); | 392 | plugin->dv_handle = GNUNET_DV_connect(env->cfg, &handle_dv_message_received, plugin); |
393 | 393 | ||
394 | if (plugin->dv_handle == NULL) | 394 | if (plugin->dv_handle == NULL) |
395 | { | 395 | { |
diff --git a/src/dv/test_transport_api_dv.c b/src/dv/test_transport_api_dv.c index d38f378ba..f53aa48f9 100644 --- a/src/dv/test_transport_api_dv.c +++ b/src/dv/test_transport_api_dv.c | |||
@@ -75,8 +75,6 @@ static unsigned long long peers_left; | |||
75 | 75 | ||
76 | static struct GNUNET_TESTING_PeerGroup *pg; | 76 | static struct GNUNET_TESTING_PeerGroup *pg; |
77 | 77 | ||
78 | static struct GNUNET_SCHEDULER_Handle *sched; | ||
79 | |||
80 | const struct GNUNET_CONFIGURATION_Handle *main_cfg; | 78 | const struct GNUNET_CONFIGURATION_Handle *main_cfg; |
81 | 79 | ||
82 | GNUNET_SCHEDULER_TaskIdentifier die_task; | 80 | GNUNET_SCHEDULER_TaskIdentifier die_task; |
@@ -231,7 +229,7 @@ finish_testing () | |||
231 | pos = pos->next; | 229 | pos = pos->next; |
232 | if (free_pos->disconnect_task != GNUNET_SCHEDULER_NO_TASK) | 230 | if (free_pos->disconnect_task != GNUNET_SCHEDULER_NO_TASK) |
233 | { | 231 | { |
234 | GNUNET_SCHEDULER_cancel(sched, free_pos->disconnect_task); | 232 | GNUNET_SCHEDULER_cancel(free_pos->disconnect_task); |
235 | } | 233 | } |
236 | GNUNET_free(free_pos); | 234 | GNUNET_free(free_pos); |
237 | } | 235 | } |
@@ -253,7 +251,7 @@ finish_testing () | |||
253 | pos = pos->next; | 251 | pos = pos->next; |
254 | if (free_pos->disconnect_task != GNUNET_SCHEDULER_NO_TASK) | 252 | if (free_pos->disconnect_task != GNUNET_SCHEDULER_NO_TASK) |
255 | { | 253 | { |
256 | GNUNET_SCHEDULER_cancel(sched, free_pos->disconnect_task); | 254 | GNUNET_SCHEDULER_cancel(free_pos->disconnect_task); |
257 | } | 255 | } |
258 | GNUNET_free(free_pos); | 256 | GNUNET_free(free_pos); |
259 | } | 257 | } |
@@ -364,7 +362,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) | |||
364 | pos = pos->next; | 362 | pos = pos->next; |
365 | if (free_pos->disconnect_task != GNUNET_SCHEDULER_NO_TASK) | 363 | if (free_pos->disconnect_task != GNUNET_SCHEDULER_NO_TASK) |
366 | { | 364 | { |
367 | GNUNET_SCHEDULER_cancel(sched, free_pos->disconnect_task); | 365 | GNUNET_SCHEDULER_cancel(free_pos->disconnect_task); |
368 | } | 366 | } |
369 | GNUNET_free(free_pos); | 367 | GNUNET_free(free_pos); |
370 | } | 368 | } |
@@ -423,28 +421,27 @@ process_mtype (void *cls, | |||
423 | 421 | ||
424 | if ((total_messages_received == expected_messages) && (total_other_messages == 0)) | 422 | if ((total_messages_received == expected_messages) && (total_other_messages == 0)) |
425 | { | 423 | { |
426 | GNUNET_SCHEDULER_cancel (sched, die_task); | 424 | GNUNET_SCHEDULER_cancel (die_task); |
427 | die_task = GNUNET_SCHEDULER_add_delayed (sched, | 425 | die_task = GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, |
428 | TEST_TIMEOUT, | ||
429 | &end_badly, "waiting for DV peers to connect!"); | 426 | &end_badly, "waiting for DV peers to connect!"); |
430 | /* | 427 | /* |
431 | if ((num_peers == 3) && (total_other_expected_messages == 2)) | 428 | if ((num_peers == 3) && (total_other_expected_messages == 2)) |
432 | { | 429 | { |
433 | GNUNET_SCHEDULER_add_now (sched, &send_other_messages, NULL); | 430 | GNUNET_SCHEDULER_add_now (&send_other_messages, NULL); |
434 | } | 431 | } |
435 | else | 432 | else |
436 | { | 433 | { |
437 | GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 20), &send_other_messages, NULL); | 434 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 20), &send_other_messages, NULL); |
438 | }*/ | 435 | }*/ |
439 | } | 436 | } |
440 | else if ((total_other_expected_messages > 0) && (total_other_messages == total_other_expected_messages)) | 437 | else if ((total_other_expected_messages > 0) && (total_other_messages == total_other_expected_messages)) |
441 | { | 438 | { |
442 | GNUNET_SCHEDULER_cancel (sched, die_task); | 439 | GNUNET_SCHEDULER_cancel (die_task); |
443 | GNUNET_SCHEDULER_add_now (sched, &finish_testing, NULL); | 440 | GNUNET_SCHEDULER_add_now (&finish_testing, NULL); |
444 | } | 441 | } |
445 | else | 442 | else |
446 | { | 443 | { |
447 | pos->disconnect_task = GNUNET_SCHEDULER_add_now(sched, &disconnect_cores, pos); | 444 | pos->disconnect_task = GNUNET_SCHEDULER_add_now(&disconnect_cores, pos); |
448 | } | 445 | } |
449 | 446 | ||
450 | return GNUNET_OK; | 447 | return GNUNET_OK; |
@@ -531,8 +528,7 @@ init_notify_peer1 (void *cls, | |||
531 | /* | 528 | /* |
532 | * Connect to the receiving peer | 529 | * Connect to the receiving peer |
533 | */ | 530 | */ |
534 | pos->peer2handle = GNUNET_CORE_connect (sched, | 531 | pos->peer2handle = GNUNET_CORE_connect (pos->peer2->cfg, |
535 | pos->peer2->cfg, | ||
536 | TIMEOUT, | 532 | TIMEOUT, |
537 | pos, | 533 | pos, |
538 | &init_notify_peer2, | 534 | &init_notify_peer2, |
@@ -554,14 +550,13 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) | |||
554 | 550 | ||
555 | if (die_task == GNUNET_SCHEDULER_NO_TASK) | 551 | if (die_task == GNUNET_SCHEDULER_NO_TASK) |
556 | { | 552 | { |
557 | die_task = GNUNET_SCHEDULER_add_delayed (sched, | 553 | die_task = GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, |
558 | TEST_TIMEOUT, | ||
559 | &end_badly, "from create topology (timeout)"); | 554 | &end_badly, "from create topology (timeout)"); |
560 | } | 555 | } |
561 | 556 | ||
562 | if (total_server_connections >= MAX_OUTSTANDING_CONNECTIONS) | 557 | if (total_server_connections >= MAX_OUTSTANDING_CONNECTIONS) |
563 | { | 558 | { |
564 | GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1), | 559 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1), |
565 | &send_test_messages, pos); | 560 | &send_test_messages, pos); |
566 | return; /* Otherwise we'll double schedule messages here! */ | 561 | return; /* Otherwise we'll double schedule messages here! */ |
567 | } | 562 | } |
@@ -571,8 +566,7 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) | |||
571 | /* | 566 | /* |
572 | * Connect to the sending peer | 567 | * Connect to the sending peer |
573 | */ | 568 | */ |
574 | pos->peer1handle = GNUNET_CORE_connect (sched, | 569 | pos->peer1handle = GNUNET_CORE_connect (pos->peer1->cfg, |
575 | pos->peer1->cfg, | ||
576 | TIMEOUT, | 570 | TIMEOUT, |
577 | pos, | 571 | pos, |
578 | &init_notify_peer1, | 572 | &init_notify_peer1, |
@@ -585,12 +579,11 @@ send_test_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) | |||
585 | 579 | ||
586 | if (total_server_connections < MAX_OUTSTANDING_CONNECTIONS) | 580 | if (total_server_connections < MAX_OUTSTANDING_CONNECTIONS) |
587 | { | 581 | { |
588 | GNUNET_SCHEDULER_add_now (sched, | 582 | GNUNET_SCHEDULER_add_now (&send_test_messages, pos->next); |
589 | &send_test_messages, pos->next); | ||
590 | } | 583 | } |
591 | else | 584 | else |
592 | { | 585 | { |
593 | GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1), | 586 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1), |
594 | &send_test_messages, pos->next); | 587 | &send_test_messages, pos->next); |
595 | } | 588 | } |
596 | } | 589 | } |
@@ -652,7 +645,7 @@ send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) | |||
652 | pos = pos->next; | 645 | pos = pos->next; |
653 | if (free_pos->disconnect_task != GNUNET_SCHEDULER_NO_TASK) | 646 | if (free_pos->disconnect_task != GNUNET_SCHEDULER_NO_TASK) |
654 | { | 647 | { |
655 | GNUNET_SCHEDULER_cancel(sched, free_pos->disconnect_task); | 648 | GNUNET_SCHEDULER_cancel(free_pos->disconnect_task); |
656 | } | 649 | } |
657 | GNUNET_free(free_pos); | 650 | GNUNET_free(free_pos); |
658 | } | 651 | } |
@@ -661,15 +654,15 @@ send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) | |||
661 | total_other_expected_messages = temp_total_other_messages; | 654 | total_other_expected_messages = temp_total_other_messages; |
662 | if (total_other_expected_messages == 0) | 655 | if (total_other_expected_messages == 0) |
663 | { | 656 | { |
664 | GNUNET_SCHEDULER_add_now (sched, &end_badly, "send_other_messages had 0 messages to send, no DV connections made!"); | 657 | GNUNET_SCHEDULER_add_now (&end_badly, "send_other_messages had 0 messages to send, no DV connections made!"); |
665 | } | 658 | } |
666 | #if VERBOSE | 659 | #if VERBOSE |
667 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Preparing to send %d other test messages\n", total_other_expected_messages); | 660 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Preparing to send %d other test messages\n", total_other_expected_messages); |
668 | #endif | 661 | #endif |
669 | 662 | ||
670 | GNUNET_SCHEDULER_add_now (sched, &send_test_messages, other_test_messages); | 663 | GNUNET_SCHEDULER_add_now (&send_test_messages, other_test_messages); |
671 | GNUNET_SCHEDULER_cancel(sched, die_task); | 664 | GNUNET_SCHEDULER_cancel(die_task); |
672 | die_task = GNUNET_SCHEDULER_add_delayed (sched, GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 250), &end_badly, "from send_other_messages"); | 665 | die_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 250), &end_badly, "from send_other_messages"); |
673 | } | 666 | } |
674 | 667 | ||
675 | void | 668 | void |
@@ -722,23 +715,22 @@ topology_callback (void *cls, | |||
722 | total_connections); | 715 | total_connections); |
723 | #endif | 716 | #endif |
724 | 717 | ||
725 | GNUNET_SCHEDULER_cancel (sched, die_task); | 718 | GNUNET_SCHEDULER_cancel (die_task); |
726 | die_task = GNUNET_SCHEDULER_NO_TASK; | 719 | die_task = GNUNET_SCHEDULER_NO_TASK; |
727 | GNUNET_SCHEDULER_add_now (sched, &send_test_messages, test_messages); | 720 | GNUNET_SCHEDULER_add_now (&send_test_messages, test_messages); |
728 | } | 721 | } |
729 | else if (total_connections + failed_connections == expected_connections) | 722 | else if (total_connections + failed_connections == expected_connections) |
730 | { | 723 | { |
731 | if (failed_connections < (unsigned int)(fail_percentage * total_connections)) | 724 | if (failed_connections < (unsigned int)(fail_percentage * total_connections)) |
732 | { | 725 | { |
733 | GNUNET_SCHEDULER_cancel (sched, die_task); | 726 | GNUNET_SCHEDULER_cancel (die_task); |
734 | die_task = GNUNET_SCHEDULER_NO_TASK; | 727 | die_task = GNUNET_SCHEDULER_NO_TASK; |
735 | GNUNET_SCHEDULER_add_now (sched, &send_test_messages, test_messages); | 728 | GNUNET_SCHEDULER_add_now (&send_test_messages, test_messages); |
736 | } | 729 | } |
737 | else | 730 | else |
738 | { | 731 | { |
739 | GNUNET_SCHEDULER_cancel (sched, die_task); | 732 | GNUNET_SCHEDULER_cancel (die_task); |
740 | die_task = GNUNET_SCHEDULER_add_now (sched, | 733 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, "from topology_callback (too many failed connections)"); |
741 | &end_badly, "from topology_callback (too many failed connections)"); | ||
742 | } | 734 | } |
743 | } | 735 | } |
744 | else | 736 | else |
@@ -764,15 +756,13 @@ connect_topology () | |||
764 | #endif | 756 | #endif |
765 | } | 757 | } |
766 | 758 | ||
767 | GNUNET_SCHEDULER_cancel (sched, die_task); | 759 | GNUNET_SCHEDULER_cancel (die_task); |
768 | if (expected_connections == GNUNET_SYSERR) | 760 | if (expected_connections == GNUNET_SYSERR) |
769 | { | 761 | { |
770 | die_task = GNUNET_SCHEDULER_add_now (sched, | 762 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, "from connect topology (bad return)"); |
771 | &end_badly, "from connect topology (bad return)"); | ||
772 | } | 763 | } |
773 | 764 | ||
774 | die_task = GNUNET_SCHEDULER_add_delayed (sched, | 765 | die_task = GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, |
775 | TEST_TIMEOUT, | ||
776 | &end_badly, "from connect topology (timeout)"); | 766 | &end_badly, "from connect topology (timeout)"); |
777 | } | 767 | } |
778 | 768 | ||
@@ -790,13 +780,11 @@ create_topology () | |||
790 | } | 780 | } |
791 | else | 781 | else |
792 | { | 782 | { |
793 | GNUNET_SCHEDULER_cancel (sched, die_task); | 783 | GNUNET_SCHEDULER_cancel (die_task); |
794 | die_task = GNUNET_SCHEDULER_add_now (sched, | 784 | die_task = GNUNET_SCHEDULER_add_now (&end_badly, "from create topology (bad return)"); |
795 | &end_badly, "from create topology (bad return)"); | ||
796 | } | 785 | } |
797 | GNUNET_SCHEDULER_cancel (sched, die_task); | 786 | GNUNET_SCHEDULER_cancel (die_task); |
798 | die_task = GNUNET_SCHEDULER_add_delayed (sched, | 787 | die_task = GNUNET_SCHEDULER_add_delayed (TEST_TIMEOUT, |
799 | TEST_TIMEOUT, | ||
800 | &end_badly, "from continue startup (timeout)"); | 788 | &end_badly, "from continue startup (timeout)"); |
801 | } | 789 | } |
802 | 790 | ||
@@ -867,7 +855,7 @@ static void all_connect_handler (void *cls, | |||
867 | 855 | ||
868 | if (temp_total_other_messages == num_additional_messages) | 856 | if (temp_total_other_messages == num_additional_messages) |
869 | { | 857 | { |
870 | GNUNET_SCHEDULER_add_now (sched, &send_other_messages, NULL); | 858 | GNUNET_SCHEDULER_add_now (&send_other_messages, NULL); |
871 | } | 859 | } |
872 | } | 860 | } |
873 | 861 | ||
@@ -892,7 +880,7 @@ peers_started_callback (void *cls, | |||
892 | GNUNET_assert(GNUNET_SYSERR != GNUNET_CONTAINER_multihashmap_put(peer_daemon_hash, &id->hashPubKey, d, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); | 880 | GNUNET_assert(GNUNET_SYSERR != GNUNET_CONTAINER_multihashmap_put(peer_daemon_hash, &id->hashPubKey, d, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); |
893 | 881 | ||
894 | new_peer = GNUNET_malloc(sizeof(struct PeerContext)); | 882 | new_peer = GNUNET_malloc(sizeof(struct PeerContext)); |
895 | new_peer->peer_handle = GNUNET_CORE_connect(sched, cfg, GNUNET_TIME_UNIT_FOREVER_REL, d, NULL, &all_connect_handler, NULL, NULL, NULL, GNUNET_NO, NULL, GNUNET_NO, no_handlers); | 883 | new_peer->peer_handle = GNUNET_CORE_connect(cfg, GNUNET_TIME_UNIT_FOREVER_REL, d, NULL, &all_connect_handler, NULL, NULL, NULL, GNUNET_NO, NULL, GNUNET_NO, no_handlers); |
896 | new_peer->daemon = d; | 884 | new_peer->daemon = d; |
897 | new_peer->next = all_peers; | 885 | new_peer->next = all_peers; |
898 | all_peers = new_peer; | 886 | all_peers = new_peer; |
@@ -905,11 +893,10 @@ peers_started_callback (void *cls, | |||
905 | "All %d daemons started, now creating topology!\n", | 893 | "All %d daemons started, now creating topology!\n", |
906 | num_peers); | 894 | num_peers); |
907 | #endif | 895 | #endif |
908 | GNUNET_SCHEDULER_cancel (sched, die_task); | 896 | GNUNET_SCHEDULER_cancel (die_task); |
909 | /* Set up task in case topology creation doesn't finish | 897 | /* Set up task in case topology creation doesn't finish |
910 | * within a reasonable amount of time */ | 898 | * within a reasonable amount of time */ |
911 | die_task = GNUNET_SCHEDULER_add_delayed (sched, | 899 | die_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
912 | GNUNET_TIME_relative_multiply | ||
913 | (GNUNET_TIME_UNIT_MINUTES, 5), | 900 | (GNUNET_TIME_UNIT_MINUTES, 5), |
914 | &end_badly, "from peers_started_callback"); | 901 | &end_badly, "from peers_started_callback"); |
915 | 902 | ||
@@ -949,21 +936,19 @@ void hostkey_callback (void *cls, | |||
949 | "All %d hostkeys created, now creating topology!\n", | 936 | "All %d hostkeys created, now creating topology!\n", |
950 | num_peers); | 937 | num_peers); |
951 | #endif | 938 | #endif |
952 | GNUNET_SCHEDULER_cancel (sched, die_task); | 939 | GNUNET_SCHEDULER_cancel (die_task); |
953 | /* Set up task in case topology creation doesn't finish | 940 | /* Set up task in case topology creation doesn't finish |
954 | * within a reasonable amount of time */ | 941 | * within a reasonable amount of time */ |
955 | die_task = GNUNET_SCHEDULER_add_delayed (sched, | 942 | die_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
956 | GNUNET_TIME_relative_multiply | ||
957 | (GNUNET_TIME_UNIT_MINUTES, 5), | 943 | (GNUNET_TIME_UNIT_MINUTES, 5), |
958 | &end_badly, "from hostkey_callback"); | 944 | &end_badly, "from hostkey_callback"); |
959 | GNUNET_SCHEDULER_add_now(sched, &create_topology, NULL); | 945 | GNUNET_SCHEDULER_add_now(&create_topology, NULL); |
960 | ok = 0; | 946 | ok = 0; |
961 | } | 947 | } |
962 | } | 948 | } |
963 | 949 | ||
964 | static void | 950 | static void |
965 | run (void *cls, | 951 | run (void *cls, |
966 | struct GNUNET_SCHEDULER_Handle *s, | ||
967 | char *const *args, | 952 | char *const *args, |
968 | const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) | 953 | const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) |
969 | { | 954 | { |
@@ -972,7 +957,6 @@ run (void *cls, | |||
972 | char * blacklist_topology_str; | 957 | char * blacklist_topology_str; |
973 | char * connect_topology_option_str; | 958 | char * connect_topology_option_str; |
974 | char * connect_topology_option_modifier_string; | 959 | char * connect_topology_option_modifier_string; |
975 | sched = s; | ||
976 | ok = 1; | 960 | ok = 1; |
977 | 961 | ||
978 | dotOutFile = fopen (dotOutFileName, "w"); | 962 | dotOutFile = fopen (dotOutFileName, "w"); |
@@ -1062,13 +1046,12 @@ run (void *cls, | |||
1062 | peers_left = num_peers; | 1046 | peers_left = num_peers; |
1063 | 1047 | ||
1064 | /* Set up a task to end testing if peer start fails */ | 1048 | /* Set up a task to end testing if peer start fails */ |
1065 | die_task = GNUNET_SCHEDULER_add_delayed (sched, | 1049 | die_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
1066 | GNUNET_TIME_relative_multiply | ||
1067 | (GNUNET_TIME_UNIT_MINUTES, 5), | 1050 | (GNUNET_TIME_UNIT_MINUTES, 5), |
1068 | &end_badly, "didn't start all daemons in reasonable amount of time!!!"); | 1051 | &end_badly, "didn't start all daemons in reasonable amount of time!!!"); |
1069 | 1052 | ||
1070 | peer_daemon_hash = GNUNET_CONTAINER_multihashmap_create(peers_left); | 1053 | peer_daemon_hash = GNUNET_CONTAINER_multihashmap_create(peers_left); |
1071 | pg = GNUNET_TESTING_daemons_start (sched, cfg, | 1054 | pg = GNUNET_TESTING_daemons_start (cfg, |
1072 | peers_left, TIMEOUT, &hostkey_callback, NULL, &peers_started_callback, NULL, | 1055 | peers_left, TIMEOUT, &hostkey_callback, NULL, &peers_started_callback, NULL, |
1073 | &topology_callback, NULL, NULL); | 1056 | &topology_callback, NULL, NULL); |
1074 | 1057 | ||