diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-01 06:47:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-01 06:47:47 +0000 |
commit | db0ea05dd78b11caf79067746252161905630e2c (patch) | |
tree | 7493523a66cb09f1eec98e82d60d4617572fa0dd /src/integration-tests | |
parent | d98788d30460549889a8e046c70e529a951aaff5 (diff) | |
download | gnunet-db0ea05dd78b11caf79067746252161905630e2c.tar.gz gnunet-db0ea05dd78b11caf79067746252161905630e2c.zip |
-fix ftbfs
Diffstat (limited to 'src/integration-tests')
-rw-r--r-- | src/integration-tests/connection_watchdog.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/integration-tests/connection_watchdog.c b/src/integration-tests/connection_watchdog.c index c52ac79e7..a012c0f22 100644 --- a/src/integration-tests/connection_watchdog.c +++ b/src/integration-tests/connection_watchdog.c | |||
@@ -68,7 +68,7 @@ static uint64_t statistics_core_entries_session_map; | |||
68 | 68 | ||
69 | static int stat_check_running; | 69 | static int stat_check_running; |
70 | 70 | ||
71 | static struct GNUNET_CONTAINER_MultiHashMap *peers; | 71 | static struct GNUNET_CONTAINER_MultiPeerMap *peers; |
72 | 72 | ||
73 | struct PeerContainer | 73 | struct PeerContainer |
74 | { | 74 | { |
@@ -119,7 +119,7 @@ static struct TransportPlugin *ptail; | |||
119 | 119 | ||
120 | static int | 120 | static int |
121 | map_check_it (void *cls, | 121 | map_check_it (void *cls, |
122 | const struct GNUNET_HashCode * key, | 122 | const struct GNUNET_PeerIdentity * key, |
123 | void *value) | 123 | void *value) |
124 | { | 124 | { |
125 | int *fail = cls; | 125 | int *fail = cls; |
@@ -140,11 +140,11 @@ map_check_it (void *cls, | |||
140 | 140 | ||
141 | static int | 141 | static int |
142 | map_cleanup_it (void *cls, | 142 | map_cleanup_it (void *cls, |
143 | const struct GNUNET_HashCode * key, | 143 | const struct GNUNET_PeerIdentity * key, |
144 | void *value) | 144 | void *value) |
145 | { | 145 | { |
146 | struct PeerContainer *pc = value; | 146 | struct PeerContainer *pc = value; |
147 | GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multihashmap_remove(peers, key, value)); | 147 | GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multipeermap_remove(peers, key, value)); |
148 | if (NULL != pc->th_ping) | 148 | if (NULL != pc->th_ping) |
149 | { | 149 | { |
150 | GNUNET_TRANSPORT_notify_transmit_ready_cancel(pc->th_ping); | 150 | GNUNET_TRANSPORT_notify_transmit_ready_cancel(pc->th_ping); |
@@ -172,8 +172,8 @@ map_cleanup_it (void *cls, | |||
172 | static void | 172 | static void |
173 | map_cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 173 | map_cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
174 | { | 174 | { |
175 | GNUNET_CONTAINER_multihashmap_iterate (peers, &map_cleanup_it, NULL); | 175 | GNUNET_CONTAINER_multipeermap_iterate (peers, &map_cleanup_it, NULL); |
176 | GNUNET_CONTAINER_multihashmap_destroy(peers); | 176 | GNUNET_CONTAINER_multipeermap_destroy(peers); |
177 | } | 177 | } |
178 | 178 | ||
179 | static void | 179 | static void |
@@ -181,7 +181,7 @@ map_check (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
181 | { | 181 | { |
182 | int fail = 0; | 182 | int fail = 0; |
183 | check_task = GNUNET_SCHEDULER_NO_TASK; | 183 | check_task = GNUNET_SCHEDULER_NO_TASK; |
184 | GNUNET_CONTAINER_multihashmap_iterate (peers, &map_check_it, &fail); | 184 | GNUNET_CONTAINER_multipeermap_iterate (peers, &map_check_it, &fail); |
185 | if (0 > fail) | 185 | if (0 > fail) |
186 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 186 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
187 | "Inconsistent peers after connection consistency check: %u\n", fail); | 187 | "Inconsistent peers after connection consistency check: %u\n", fail); |
@@ -466,7 +466,7 @@ send_core_ping_cb (void *cls, size_t size, void *buf) | |||
466 | 466 | ||
467 | static int | 467 | static int |
468 | map_ping_it (void *cls, | 468 | map_ping_it (void *cls, |
469 | const struct GNUNET_HashCode * key, | 469 | const struct GNUNET_PeerIdentity * key, |
470 | void *value) | 470 | void *value) |
471 | { | 471 | { |
472 | struct PeerContainer *pc = value; | 472 | struct PeerContainer *pc = value; |
@@ -504,7 +504,7 @@ stats_check (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
504 | statistics_task = GNUNET_SCHEDULER_add_delayed(STATS_DELAY, &stats_check, NULL); | 504 | statistics_task = GNUNET_SCHEDULER_add_delayed(STATS_DELAY, &stats_check, NULL); |
505 | } | 505 | } |
506 | 506 | ||
507 | GNUNET_CONTAINER_multihashmap_iterate (peers, &map_ping_it, NULL); | 507 | GNUNET_CONTAINER_multipeermap_iterate (peers, &map_ping_it, NULL); |
508 | 508 | ||
509 | stat_check_running = GNUNET_YES; | 509 | stat_check_running = GNUNET_YES; |
510 | 510 | ||
@@ -578,16 +578,16 @@ static void | |||
578 | map_connect (const struct GNUNET_PeerIdentity *peer, void * source) | 578 | map_connect (const struct GNUNET_PeerIdentity *peer, void * source) |
579 | { | 579 | { |
580 | struct PeerContainer * pc; | 580 | struct PeerContainer * pc; |
581 | if (GNUNET_NO == GNUNET_CONTAINER_multihashmap_contains(peers, &peer->hashPubKey)) | 581 | if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains(peers, peer)) |
582 | { | 582 | { |
583 | pc = GNUNET_malloc (sizeof (struct PeerContainer)); | 583 | pc = GNUNET_malloc (sizeof (struct PeerContainer)); |
584 | pc->id = *peer; | 584 | pc->id = *peer; |
585 | pc->core_connected = GNUNET_NO; | 585 | pc->core_connected = GNUNET_NO; |
586 | pc->transport_connected = GNUNET_NO; | 586 | pc->transport_connected = GNUNET_NO; |
587 | GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multihashmap_put(peers, &peer->hashPubKey, pc, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); | 587 | GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multipeermap_put(peers, peer, pc, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); |
588 | } | 588 | } |
589 | 589 | ||
590 | pc = GNUNET_CONTAINER_multihashmap_get(peers, &peer->hashPubKey); | 590 | pc = GNUNET_CONTAINER_multipeermap_get(peers, peer); |
591 | GNUNET_assert (NULL != pc); | 591 | GNUNET_assert (NULL != pc); |
592 | 592 | ||
593 | if (source == th) | 593 | if (source == th) |
@@ -656,7 +656,7 @@ map_disconnect (const struct GNUNET_PeerIdentity * peer, void * source) | |||
656 | { | 656 | { |
657 | 657 | ||
658 | struct PeerContainer * pc; | 658 | struct PeerContainer * pc; |
659 | if (GNUNET_NO == GNUNET_CONTAINER_multihashmap_contains(peers, &peer->hashPubKey)) | 659 | if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains(peers, peer)) |
660 | { | 660 | { |
661 | if (source == th) | 661 | if (source == th) |
662 | { | 662 | { |
@@ -675,7 +675,7 @@ map_disconnect (const struct GNUNET_PeerIdentity * peer, void * source) | |||
675 | } | 675 | } |
676 | } | 676 | } |
677 | 677 | ||
678 | pc = GNUNET_CONTAINER_multihashmap_get(peers, &peer->hashPubKey); | 678 | pc = GNUNET_CONTAINER_multipeermap_get(peers, peer); |
679 | GNUNET_assert (NULL != pc); | 679 | GNUNET_assert (NULL != pc); |
680 | 680 | ||
681 | if (source == th) | 681 | if (source == th) |
@@ -736,7 +736,7 @@ map_disconnect (const struct GNUNET_PeerIdentity * peer, void * source) | |||
736 | if ((GNUNET_NO == pc->core_connected) && (GNUNET_NO == pc->transport_connected)) | 736 | if ((GNUNET_NO == pc->core_connected) && (GNUNET_NO == pc->transport_connected)) |
737 | { | 737 | { |
738 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Removing peer `%s'\n", GNUNET_i2s (&pc->id)); | 738 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Removing peer `%s'\n", GNUNET_i2s (&pc->id)); |
739 | GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multihashmap_remove (peers, &peer->hashPubKey, pc)); | 739 | GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multipeermap_remove (peers, peer, pc)); |
740 | 740 | ||
741 | 741 | ||
742 | GNUNET_free (pc); | 742 | GNUNET_free (pc); |
@@ -841,7 +841,7 @@ transport_notify_receive_cb (void *cls, | |||
841 | { | 841 | { |
842 | struct PeerContainer *pc; | 842 | struct PeerContainer *pc; |
843 | 843 | ||
844 | pc = GNUNET_CONTAINER_multihashmap_get (peers, &peer->hashPubKey); | 844 | pc = GNUNET_CONTAINER_multipeermap_get (peers, peer); |
845 | if (NULL == pc) | 845 | if (NULL == pc) |
846 | { | 846 | { |
847 | GNUNET_break (0); | 847 | GNUNET_break (0); |
@@ -884,7 +884,7 @@ core_notify_receive_cb (void *cls, | |||
884 | { | 884 | { |
885 | struct PeerContainer *pc = NULL; | 885 | struct PeerContainer *pc = NULL; |
886 | 886 | ||
887 | pc = GNUNET_CONTAINER_multihashmap_get(peers, &peer->hashPubKey); | 887 | pc = GNUNET_CONTAINER_multipeermap_get(peers, peer); |
888 | 888 | ||
889 | if (NULL == pc) | 889 | if (NULL == pc) |
890 | { | 890 | { |
@@ -1068,7 +1068,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
1068 | init(); | 1068 | init(); |
1069 | 1069 | ||
1070 | stats = GNUNET_STATISTICS_create ("watchdog", cfg); | 1070 | stats = GNUNET_STATISTICS_create ("watchdog", cfg); |
1071 | peers = GNUNET_CONTAINER_multihashmap_create (32, GNUNET_NO); | 1071 | peers = GNUNET_CONTAINER_multipeermap_create (32, GNUNET_NO); |
1072 | 1072 | ||
1073 | th = GNUNET_TRANSPORT_connect(cfg, NULL, NULL, | 1073 | th = GNUNET_TRANSPORT_connect(cfg, NULL, NULL, |
1074 | &transport_notify_receive_cb, | 1074 | &transport_notify_receive_cb, |