diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-01 07:46:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-01 07:46:18 +0000 |
commit | 15e69b2c40795016f3365ec2e75d3368a23d6013 (patch) | |
tree | c089d28b91676d62bfa89c22ec785bda26963123 /src/experimentation/gnunet-daemon-experimentation_nodes.c | |
parent | b7365c9a57b357d6f19f4f8101d3177e142a235c (diff) | |
download | gnunet-15e69b2c40795016f3365ec2e75d3368a23d6013.tar.gz gnunet-15e69b2c40795016f3365ec2e75d3368a23d6013.zip |
-just indentation
Diffstat (limited to 'src/experimentation/gnunet-daemon-experimentation_nodes.c')
-rw-r--r-- | src/experimentation/gnunet-daemon-experimentation_nodes.c | 125 |
1 files changed, 63 insertions, 62 deletions
diff --git a/src/experimentation/gnunet-daemon-experimentation_nodes.c b/src/experimentation/gnunet-daemon-experimentation_nodes.c index d13330b3f..cf278c3ec 100644 --- a/src/experimentation/gnunet-daemon-experimentation_nodes.c +++ b/src/experimentation/gnunet-daemon-experimentation_nodes.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2009 Christian Grothoff (and other contributing authors) | 3 | (C) 2012-2013 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -32,35 +32,33 @@ | |||
32 | 32 | ||
33 | 33 | ||
34 | #define FAST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) | 34 | #define FAST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
35 | |||
35 | /** | 36 | /** |
36 | * Core handle | 37 | * Core handle |
37 | */ | 38 | */ |
38 | static struct GNUNET_CORE_Handle *ch; | 39 | static struct GNUNET_CORE_Handle *ch; |
39 | 40 | ||
40 | |||
41 | /** | 41 | /** |
42 | * Peer's own identity | 42 | * Peer's own identity |
43 | */ | 43 | */ |
44 | static struct GNUNET_PeerIdentity me; | 44 | static struct GNUNET_PeerIdentity me; |
45 | 45 | ||
46 | |||
47 | /** | 46 | /** |
48 | * Nodes with a pending request | 47 | * Nodes with a pending request |
49 | */ | 48 | */ |
50 | struct GNUNET_CONTAINER_MultiHashMap *nodes_requested; | 49 | static struct GNUNET_CONTAINER_MultiPeerMap *nodes_requested; |
51 | |||
52 | 50 | ||
53 | /** | 51 | /** |
54 | * Active experimentation nodes | 52 | * Active experimentation nodes |
55 | */ | 53 | */ |
56 | struct GNUNET_CONTAINER_MultiHashMap *nodes_active; | 54 | static struct GNUNET_CONTAINER_MultiPeerMap *nodes_active; |
57 | |||
58 | 55 | ||
59 | /** | 56 | /** |
60 | * Inactive experimentation nodes | 57 | * Inactive experimentation nodes |
61 | * To be excluded from future requests | 58 | * To be excluded from future requests |
62 | */ | 59 | */ |
63 | struct GNUNET_CONTAINER_MultiHashMap *nodes_inactive; | 60 | static struct GNUNET_CONTAINER_MultiPeerMap *nodes_inactive; |
61 | |||
64 | 62 | ||
65 | struct NodeComCtx | 63 | struct NodeComCtx |
66 | { | 64 | { |
@@ -79,9 +77,10 @@ struct NodeComCtx | |||
79 | /** | 77 | /** |
80 | * Update statistics | 78 | * Update statistics |
81 | * | 79 | * |
82 | * @param m hashmap to update values from | 80 | * @param m peermap to update values from |
83 | */ | 81 | */ |
84 | static void update_stats (struct GNUNET_CONTAINER_MultiHashMap *m) | 82 | static void |
83 | update_stats (struct GNUNET_CONTAINER_MultiPeerMap *m) | ||
85 | { | 84 | { |
86 | GNUNET_assert (NULL != m); | 85 | GNUNET_assert (NULL != m); |
87 | GNUNET_assert (NULL != GED_stats); | 86 | GNUNET_assert (NULL != GED_stats); |
@@ -89,17 +88,17 @@ static void update_stats (struct GNUNET_CONTAINER_MultiHashMap *m) | |||
89 | if (m == nodes_active) | 88 | if (m == nodes_active) |
90 | { | 89 | { |
91 | GNUNET_STATISTICS_set (GED_stats, "# nodes active", | 90 | GNUNET_STATISTICS_set (GED_stats, "# nodes active", |
92 | GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); | 91 | GNUNET_CONTAINER_multipeermap_size(m), GNUNET_NO); |
93 | } | 92 | } |
94 | else if (m == nodes_inactive) | 93 | else if (m == nodes_inactive) |
95 | { | 94 | { |
96 | GNUNET_STATISTICS_set (GED_stats, "# nodes inactive", | 95 | GNUNET_STATISTICS_set (GED_stats, "# nodes inactive", |
97 | GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); | 96 | GNUNET_CONTAINER_multipeermap_size(m), GNUNET_NO); |
98 | } | 97 | } |
99 | else if (m == nodes_requested) | 98 | else if (m == nodes_requested) |
100 | { | 99 | { |
101 | GNUNET_STATISTICS_set (GED_stats, "# nodes requested", | 100 | GNUNET_STATISTICS_set (GED_stats, "# nodes requested", |
102 | GNUNET_CONTAINER_multihashmap_size(m), GNUNET_NO); | 101 | GNUNET_CONTAINER_multipeermap_size(m), GNUNET_NO); |
103 | } | 102 | } |
104 | else | 103 | else |
105 | GNUNET_break (0); | 104 | GNUNET_break (0); |
@@ -110,20 +109,20 @@ static void update_stats (struct GNUNET_CONTAINER_MultiHashMap *m) | |||
110 | /** | 109 | /** |
111 | * Clean up node | 110 | * Clean up node |
112 | * | 111 | * |
113 | * @param cls the hashmap to clean up | 112 | * @param cls the peermap to clean up |
114 | * @param key key of the current node | 113 | * @param key key of the current node |
115 | * @param value related node object | 114 | * @param value related node object |
116 | * @return always GNUNET_OK | 115 | * @return always #GNUNET_OK |
117 | */ | 116 | */ |
118 | static int | 117 | static int |
119 | cleanup_node (void *cls, | 118 | cleanup_node (void *cls, |
120 | const struct GNUNET_HashCode * key, | 119 | const struct GNUNET_PeerIdentity * key, |
121 | void *value) | 120 | void *value) |
122 | { | 121 | { |
123 | struct Node *n; | 122 | struct Node *n; |
124 | struct NodeComCtx *e_cur; | 123 | struct NodeComCtx *e_cur; |
125 | struct NodeComCtx *e_next; | 124 | struct NodeComCtx *e_next; |
126 | struct GNUNET_CONTAINER_MultiHashMap *cur = cls; | 125 | struct GNUNET_CONTAINER_MultiPeerMap *cur = cls; |
127 | 126 | ||
128 | n = value; | 127 | n = value; |
129 | if (GNUNET_SCHEDULER_NO_TASK != n->timeout_task) | 128 | if (GNUNET_SCHEDULER_NO_TASK != n->timeout_task) |
@@ -147,7 +146,7 @@ cleanup_node (void *cls, | |||
147 | 146 | ||
148 | GNUNET_free_non_null (n->issuer_id); | 147 | GNUNET_free_non_null (n->issuer_id); |
149 | 148 | ||
150 | GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (cur, key, value)); | 149 | GNUNET_break (0 == GNUNET_CONTAINER_multipeermap_remove (cur, key, value)); |
151 | GNUNET_free (value); | 150 | GNUNET_free (value); |
152 | return GNUNET_OK; | 151 | return GNUNET_OK; |
153 | } | 152 | } |
@@ -159,14 +158,16 @@ cleanup_node (void *cls, | |||
159 | * @param id the id to check | 158 | * @param id the id to check |
160 | * @return GNUNET_YES or GNUNET_NO | 159 | * @return GNUNET_YES or GNUNET_NO |
161 | */ | 160 | */ |
162 | static int is_me (const struct GNUNET_PeerIdentity *id) | 161 | static int |
162 | is_me (const struct GNUNET_PeerIdentity *id) | ||
163 | { | 163 | { |
164 | if (0 == memcmp (&me, id, sizeof (me))) | 164 | if (0 == memcmp (&me, id, sizeof (me))) |
165 | return GNUNET_YES; | 165 | return GNUNET_YES; |
166 | else | 166 | else |
167 | return GNUNET_NO; | 167 | return GNUNET_NO; |
168 | } | 168 | } |
169 | 169 | ||
170 | |||
170 | /** | 171 | /** |
171 | * Core startup callback | 172 | * Core startup callback |
172 | * | 173 | * |
@@ -239,11 +240,11 @@ remove_request (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
239 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Removing request for peer %s due to timeout\n", | 240 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Removing request for peer %s due to timeout\n", |
240 | GNUNET_i2s (&n->id)); | 241 | GNUNET_i2s (&n->id)); |
241 | 242 | ||
242 | if (GNUNET_YES == GNUNET_CONTAINER_multihashmap_contains (nodes_requested, &n->id.hashPubKey)) | 243 | if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (nodes_requested, &n->id)) |
243 | { | 244 | { |
244 | GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (nodes_requested, &n->id.hashPubKey, n)); | 245 | GNUNET_break (0 == GNUNET_CONTAINER_multipeermap_remove (nodes_requested, &n->id, n)); |
245 | update_stats (nodes_requested); | 246 | update_stats (nodes_requested); |
246 | GNUNET_CONTAINER_multihashmap_put (nodes_inactive, &n->id.hashPubKey, n, | 247 | GNUNET_CONTAINER_multipeermap_put (nodes_inactive, &n->id, n, |
247 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); | 248 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); |
248 | update_stats (nodes_inactive); | 249 | update_stats (nodes_inactive); |
249 | } | 250 | } |
@@ -325,8 +326,8 @@ send_experimentation_request (const struct GNUNET_PeerIdentity *peer) | |||
325 | GNUNET_CONTAINER_DLL_insert_tail(n->e_req_head, n->e_req_tail, e_ctx); | 326 | GNUNET_CONTAINER_DLL_insert_tail(n->e_req_head, n->e_req_tail, e_ctx); |
326 | schedule_transmisson (e_ctx); | 327 | schedule_transmisson (e_ctx); |
327 | 328 | ||
328 | GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multihashmap_put (nodes_requested, | 329 | GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multipeermap_put (nodes_requested, |
329 | &peer->hashPubKey, n, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)); | 330 | peer, n, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)); |
330 | update_stats (nodes_requested); | 331 | update_stats (nodes_requested); |
331 | } | 332 | } |
332 | 333 | ||
@@ -389,17 +390,17 @@ get_node (const struct GNUNET_PeerIdentity *id) | |||
389 | 390 | ||
390 | res = NULL; | 391 | res = NULL; |
391 | tmp = NULL; | 392 | tmp = NULL; |
392 | tmp = GNUNET_CONTAINER_multihashmap_get (nodes_active, &id->hashPubKey); | 393 | tmp = GNUNET_CONTAINER_multipeermap_get (nodes_active, id); |
393 | if (res == NULL) | 394 | if (res == NULL) |
394 | res = tmp; | 395 | res = tmp; |
395 | 396 | ||
396 | tmp = GNUNET_CONTAINER_multihashmap_get (nodes_inactive, &id->hashPubKey); | 397 | tmp = GNUNET_CONTAINER_multipeermap_get (nodes_inactive, id); |
397 | if (res == NULL) | 398 | if (res == NULL) |
398 | res = tmp; | 399 | res = tmp; |
399 | else | 400 | else |
400 | GNUNET_break (0); /* Multiple instances */ | 401 | GNUNET_break (0); /* Multiple instances */ |
401 | 402 | ||
402 | tmp = GNUNET_CONTAINER_multihashmap_get (nodes_requested, &id->hashPubKey); | 403 | tmp = GNUNET_CONTAINER_multipeermap_get (nodes_requested, id); |
403 | if (res == NULL) | 404 | if (res == NULL) |
404 | res = tmp; | 405 | res = tmp; |
405 | else | 406 | else |
@@ -417,8 +418,8 @@ get_node (const struct GNUNET_PeerIdentity *id) | |||
417 | static void node_make_active (struct Node *n) | 418 | static void node_make_active (struct Node *n) |
418 | { | 419 | { |
419 | int c1; | 420 | int c1; |
420 | GNUNET_CONTAINER_multihashmap_put (nodes_active, | 421 | GNUNET_CONTAINER_multipeermap_put (nodes_active, |
421 | &n->id.hashPubKey, n, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); | 422 | &n->id, n, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); |
422 | update_stats (nodes_active); | 423 | update_stats (nodes_active); |
423 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Added peer `%s' as active node\n"), | 424 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Added peer `%s' as active node\n"), |
424 | GNUNET_i2s (&n->id)); | 425 | GNUNET_i2s (&n->id)); |
@@ -463,13 +464,13 @@ static void handle_request (const struct GNUNET_PeerIdentity *peer, | |||
463 | } | 464 | } |
464 | 465 | ||
465 | make_active = GNUNET_NO; | 466 | make_active = GNUNET_NO; |
466 | if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_active, &peer->hashPubKey))) | 467 | if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_active, peer))) |
467 | { | 468 | { |
468 | /* Nothing to do */ | 469 | /* Nothing to do */ |
469 | } | 470 | } |
470 | else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_requested, &peer->hashPubKey))) | 471 | else if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_requested, peer))) |
471 | { | 472 | { |
472 | GNUNET_CONTAINER_multihashmap_remove (nodes_requested, &peer->hashPubKey, n); | 473 | GNUNET_CONTAINER_multipeermap_remove (nodes_requested, peer, n); |
473 | if (GNUNET_SCHEDULER_NO_TASK != n->timeout_task) | 474 | if (GNUNET_SCHEDULER_NO_TASK != n->timeout_task) |
474 | { | 475 | { |
475 | GNUNET_SCHEDULER_cancel (n->timeout_task); | 476 | GNUNET_SCHEDULER_cancel (n->timeout_task); |
@@ -478,9 +479,9 @@ static void handle_request (const struct GNUNET_PeerIdentity *peer, | |||
478 | update_stats (nodes_requested); | 479 | update_stats (nodes_requested); |
479 | make_active = GNUNET_YES; | 480 | make_active = GNUNET_YES; |
480 | } | 481 | } |
481 | else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_inactive, &peer->hashPubKey))) | 482 | else if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_inactive, peer))) |
482 | { | 483 | { |
483 | GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n)); | 484 | GNUNET_break (0 == GNUNET_CONTAINER_multipeermap_remove (nodes_inactive, peer, n)); |
484 | update_stats (nodes_inactive); | 485 | update_stats (nodes_inactive); |
485 | make_active = GNUNET_YES; | 486 | make_active = GNUNET_YES; |
486 | } | 487 | } |
@@ -565,16 +566,16 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer, | |||
565 | } | 566 | } |
566 | 567 | ||
567 | make_active = GNUNET_NO; | 568 | make_active = GNUNET_NO; |
568 | if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_active, &peer->hashPubKey))) | 569 | if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_active, peer))) |
569 | { | 570 | { |
570 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from %s peer `%s'\n", | 571 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from %s peer `%s'\n", |
571 | "RESPONSE", "active", GNUNET_i2s (peer)); | 572 | "RESPONSE", "active", GNUNET_i2s (peer)); |
572 | } | 573 | } |
573 | else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_requested, &peer->hashPubKey))) | 574 | else if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_requested, peer))) |
574 | { | 575 | { |
575 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from %s peer `%s'\n", | 576 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from %s peer `%s'\n", |
576 | "RESPONSE", "requested", GNUNET_i2s (peer)); | 577 | "RESPONSE", "requested", GNUNET_i2s (peer)); |
577 | GNUNET_CONTAINER_multihashmap_remove (nodes_requested, &peer->hashPubKey, n); | 578 | GNUNET_CONTAINER_multipeermap_remove (nodes_requested, peer, n); |
578 | if (GNUNET_SCHEDULER_NO_TASK != n->timeout_task) | 579 | if (GNUNET_SCHEDULER_NO_TASK != n->timeout_task) |
579 | { | 580 | { |
580 | GNUNET_SCHEDULER_cancel (n->timeout_task); | 581 | GNUNET_SCHEDULER_cancel (n->timeout_task); |
@@ -583,11 +584,11 @@ static void handle_response (const struct GNUNET_PeerIdentity *peer, | |||
583 | update_stats (nodes_requested); | 584 | update_stats (nodes_requested); |
584 | make_active = GNUNET_YES; | 585 | make_active = GNUNET_YES; |
585 | } | 586 | } |
586 | else if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_inactive, &peer->hashPubKey))) | 587 | else if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_inactive, peer))) |
587 | { | 588 | { |
588 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from peer `%s'\n", | 589 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received %s from peer `%s'\n", |
589 | "RESPONSE", "inactive", GNUNET_i2s (peer)); | 590 | "RESPONSE", "inactive", GNUNET_i2s (peer)); |
590 | GNUNET_break (0 == GNUNET_CONTAINER_multihashmap_remove (nodes_inactive, &peer->hashPubKey, n)); | 591 | GNUNET_break (0 == GNUNET_CONTAINER_multipeermap_remove (nodes_inactive, peer, n)); |
591 | update_stats (nodes_inactive); | 592 | update_stats (nodes_inactive); |
592 | make_active = GNUNET_YES; | 593 | make_active = GNUNET_YES; |
593 | } | 594 | } |
@@ -850,13 +851,13 @@ void core_connect_handler (void *cls, | |||
850 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Connected to peer %s\n"), | 851 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Connected to peer %s\n"), |
851 | GNUNET_i2s (peer)); | 852 | GNUNET_i2s (peer)); |
852 | 853 | ||
853 | if (GNUNET_YES == GNUNET_CONTAINER_multihashmap_contains (nodes_requested, &peer->hashPubKey)) | 854 | if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (nodes_requested, peer)) |
854 | return; /* We already sent a request */ | 855 | return; /* We already sent a request */ |
855 | 856 | ||
856 | if (GNUNET_YES == GNUNET_CONTAINER_multihashmap_contains (nodes_active, &peer->hashPubKey)) | 857 | if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (nodes_active, peer)) |
857 | return; /* This peer is known as active */ | 858 | return; /* This peer is known as active */ |
858 | 859 | ||
859 | if (GNUNET_YES == GNUNET_CONTAINER_multihashmap_contains (nodes_inactive, &peer->hashPubKey)) | 860 | if (GNUNET_YES == GNUNET_CONTAINER_multipeermap_contains (nodes_inactive, peer)) |
860 | return; /* This peer is known as inactive */ | 861 | return; /* This peer is known as inactive */ |
861 | 862 | ||
862 | send_experimentation_request (peer); | 863 | send_experimentation_request (peer); |
@@ -879,14 +880,14 @@ void core_disconnect_handler (void *cls, | |||
879 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Disconnected from peer %s\n"), | 880 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Disconnected from peer %s\n"), |
880 | GNUNET_i2s (peer)); | 881 | GNUNET_i2s (peer)); |
881 | 882 | ||
882 | if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_requested, &peer->hashPubKey))) | 883 | if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_requested, peer))) |
883 | cleanup_node (nodes_requested, &peer->hashPubKey, n); | 884 | cleanup_node (nodes_requested, peer, n); |
884 | 885 | ||
885 | if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_active, &peer->hashPubKey))) | 886 | if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_active, peer))) |
886 | cleanup_node (nodes_active, &peer->hashPubKey, n); | 887 | cleanup_node (nodes_active, peer, n); |
887 | 888 | ||
888 | if (NULL != (n = GNUNET_CONTAINER_multihashmap_get (nodes_inactive, &peer->hashPubKey))) | 889 | if (NULL != (n = GNUNET_CONTAINER_multipeermap_get (nodes_inactive, peer))) |
889 | cleanup_node (nodes_inactive, &peer->hashPubKey, n); | 890 | cleanup_node (nodes_inactive, peer, n); |
890 | } | 891 | } |
891 | 892 | ||
892 | 893 | ||
@@ -1060,9 +1061,9 @@ GED_nodes_start () | |||
1060 | return; | 1061 | return; |
1061 | } | 1062 | } |
1062 | 1063 | ||
1063 | nodes_requested = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO); | 1064 | nodes_requested = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO); |
1064 | nodes_active = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO); | 1065 | nodes_active = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO); |
1065 | nodes_inactive = GNUNET_CONTAINER_multihashmap_create (10, GNUNET_NO); | 1066 | nodes_inactive = GNUNET_CONTAINER_multipeermap_create (10, GNUNET_NO); |
1066 | } | 1067 | } |
1067 | 1068 | ||
1068 | 1069 | ||
@@ -1080,31 +1081,31 @@ GED_nodes_stop () | |||
1080 | 1081 | ||
1081 | if (NULL != nodes_requested) | 1082 | if (NULL != nodes_requested) |
1082 | { | 1083 | { |
1083 | GNUNET_CONTAINER_multihashmap_iterate (nodes_requested, | 1084 | GNUNET_CONTAINER_multipeermap_iterate (nodes_requested, |
1084 | &cleanup_node, | 1085 | &cleanup_node, |
1085 | nodes_requested); | 1086 | nodes_requested); |
1086 | update_stats (nodes_requested); | 1087 | update_stats (nodes_requested); |
1087 | GNUNET_CONTAINER_multihashmap_destroy (nodes_requested); | 1088 | GNUNET_CONTAINER_multipeermap_destroy (nodes_requested); |
1088 | nodes_requested = NULL; | 1089 | nodes_requested = NULL; |
1089 | } | 1090 | } |
1090 | 1091 | ||
1091 | if (NULL != nodes_active) | 1092 | if (NULL != nodes_active) |
1092 | { | 1093 | { |
1093 | GNUNET_CONTAINER_multihashmap_iterate (nodes_active, | 1094 | GNUNET_CONTAINER_multipeermap_iterate (nodes_active, |
1094 | &cleanup_node, | 1095 | &cleanup_node, |
1095 | nodes_active); | 1096 | nodes_active); |
1096 | update_stats (nodes_active); | 1097 | update_stats (nodes_active); |
1097 | GNUNET_CONTAINER_multihashmap_destroy (nodes_active); | 1098 | GNUNET_CONTAINER_multipeermap_destroy (nodes_active); |
1098 | nodes_active = NULL; | 1099 | nodes_active = NULL; |
1099 | } | 1100 | } |
1100 | 1101 | ||
1101 | if (NULL != nodes_inactive) | 1102 | if (NULL != nodes_inactive) |
1102 | { | 1103 | { |
1103 | GNUNET_CONTAINER_multihashmap_iterate (nodes_inactive, | 1104 | GNUNET_CONTAINER_multipeermap_iterate (nodes_inactive, |
1104 | &cleanup_node, | 1105 | &cleanup_node, |
1105 | nodes_inactive); | 1106 | nodes_inactive); |
1106 | update_stats (nodes_inactive); | 1107 | update_stats (nodes_inactive); |
1107 | GNUNET_CONTAINER_multihashmap_destroy (nodes_inactive); | 1108 | GNUNET_CONTAINER_multipeermap_destroy (nodes_inactive); |
1108 | nodes_inactive = NULL; | 1109 | nodes_inactive = NULL; |
1109 | } | 1110 | } |
1110 | } | 1111 | } |