diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-30 20:35:10 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-30 20:35:10 +0000 |
commit | a0ba5b741b56036bd35bd9ba88164324b2ff7ada (patch) | |
tree | 3fd10a0fc15f9a9e7cf5415b2bec86d97d7fe825 /src/transport/gnunet-service-transport_validation.c | |
parent | 427dd6f998fb1fde515a3b5c800f9f6d308197b2 (diff) | |
download | gnunet-a0ba5b741b56036bd35bd9ba88164324b2ff7ada.tar.gz gnunet-a0ba5b741b56036bd35bd9ba88164324b2ff7ada.zip |
-getting ATS and transport to compile again (part of #3047)
Diffstat (limited to 'src/transport/gnunet-service-transport_validation.c')
-rw-r--r-- | src/transport/gnunet-service-transport_validation.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index fe493f822..54393d753 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -311,7 +311,7 @@ static struct CheckHelloValidatedContext *chvc_tail; | |||
311 | * of the given peer that we are currently validating, have validated | 311 | * of the given peer that we are currently validating, have validated |
312 | * or are blocked from re-validation for a while). | 312 | * or are blocked from re-validation for a while). |
313 | */ | 313 | */ |
314 | static struct GNUNET_CONTAINER_MultiHashMap *validation_map; | 314 | static struct GNUNET_CONTAINER_MultiPeerMap *validation_map; |
315 | 315 | ||
316 | /** | 316 | /** |
317 | * Context for peerinfo iteration. | 317 | * Context for peerinfo iteration. |
@@ -367,7 +367,7 @@ struct ValidationEntryMatchContext | |||
367 | * GNUNET_NO if the entry does match | 367 | * GNUNET_NO if the entry does match |
368 | */ | 368 | */ |
369 | static int | 369 | static int |
370 | validation_entry_match (void *cls, const struct GNUNET_HashCode * key, void *value) | 370 | validation_entry_match (void *cls, const struct GNUNET_PeerIdentity * key, void *value) |
371 | { | 371 | { |
372 | struct ValidationEntryMatchContext *vemc = cls; | 372 | struct ValidationEntryMatchContext *vemc = cls; |
373 | struct ValidationEntry *ve = value; | 373 | struct ValidationEntry *ve = value; |
@@ -390,7 +390,7 @@ validation_entry_match (void *cls, const struct GNUNET_HashCode * key, void *val | |||
390 | * @return GNUNET_YES (continue to iterate) | 390 | * @return GNUNET_YES (continue to iterate) |
391 | */ | 391 | */ |
392 | static int | 392 | static int |
393 | cleanup_validation_entry (void *cls, const struct GNUNET_HashCode * key, void *value) | 393 | cleanup_validation_entry (void *cls, const struct GNUNET_PeerIdentity * key, void *value) |
394 | { | 394 | { |
395 | struct ValidationEntry *ve = value; | 395 | struct ValidationEntry *ve = value; |
396 | 396 | ||
@@ -400,8 +400,8 @@ cleanup_validation_entry (void *cls, const struct GNUNET_HashCode * key, void *v | |||
400 | ve->bc = NULL; | 400 | ve->bc = NULL; |
401 | } | 401 | } |
402 | GNUNET_break (GNUNET_OK == | 402 | GNUNET_break (GNUNET_OK == |
403 | GNUNET_CONTAINER_multihashmap_remove (validation_map, | 403 | GNUNET_CONTAINER_multipeermap_remove (validation_map, |
404 | &ve->pid.hashPubKey, ve)); | 404 | &ve->pid, ve)); |
405 | GNUNET_HELLO_address_free (ve->address); | 405 | GNUNET_HELLO_address_free (ve->address); |
406 | if (GNUNET_SCHEDULER_NO_TASK != ve->timeout_task) | 406 | if (GNUNET_SCHEDULER_NO_TASK != ve->timeout_task) |
407 | { | 407 | { |
@@ -454,7 +454,7 @@ timeout_hello_validation (void *cls, | |||
454 | GNUNET_STATISTICS_update (GST_stats, | 454 | GNUNET_STATISTICS_update (GST_stats, |
455 | gettext_noop ("# address records discarded"), 1, | 455 | gettext_noop ("# address records discarded"), 1, |
456 | GNUNET_NO); | 456 | GNUNET_NO); |
457 | cleanup_validation_entry (NULL, &ve->pid.hashPubKey, ve); | 457 | cleanup_validation_entry (NULL, &ve->pid, ve); |
458 | } | 458 | } |
459 | 459 | ||
460 | 460 | ||
@@ -686,8 +686,8 @@ find_validation_entry (const struct GNUNET_CRYPTO_EccPublicSignKey *public_key, | |||
686 | 686 | ||
687 | vemc.ve = NULL; | 687 | vemc.ve = NULL; |
688 | vemc.address = address; | 688 | vemc.address = address; |
689 | GNUNET_CONTAINER_multihashmap_get_multiple (validation_map, | 689 | GNUNET_CONTAINER_multipeermap_get_multiple (validation_map, |
690 | &address->peer.hashPubKey, | 690 | &address->peer, |
691 | &validation_entry_match, &vemc); | 691 | &validation_entry_match, &vemc); |
692 | if (NULL != (ve = vemc.ve)) | 692 | if (NULL != (ve = vemc.ve)) |
693 | return ve; | 693 | return ve; |
@@ -708,7 +708,7 @@ find_validation_entry (const struct GNUNET_CRYPTO_EccPublicSignKey *public_key, | |||
708 | ve->timeout_task = | 708 | ve->timeout_task = |
709 | GNUNET_SCHEDULER_add_delayed (UNVALIDATED_PING_KEEPALIVE, | 709 | GNUNET_SCHEDULER_add_delayed (UNVALIDATED_PING_KEEPALIVE, |
710 | &timeout_hello_validation, ve); | 710 | &timeout_hello_validation, ve); |
711 | GNUNET_CONTAINER_multihashmap_put (validation_map, &address->peer.hashPubKey, | 711 | GNUNET_CONTAINER_multipeermap_put (validation_map, &address->peer, |
712 | ve, | 712 | ve, |
713 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); | 713 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE); |
714 | ve->expecting_pong = GNUNET_NO; | 714 | ve->expecting_pong = GNUNET_NO; |
@@ -814,7 +814,7 @@ GST_validation_start (unsigned int max_fds) | |||
814 | validations_fast_start_threshold, | 814 | validations_fast_start_threshold, |
815 | GNUNET_STRINGS_relative_time_to_string (validation_delay, | 815 | GNUNET_STRINGS_relative_time_to_string (validation_delay, |
816 | GNUNET_YES)); | 816 | GNUNET_YES)); |
817 | validation_map = GNUNET_CONTAINER_multihashmap_create (VALIDATION_MAP_SIZE, | 817 | validation_map = GNUNET_CONTAINER_multipeermap_create (VALIDATION_MAP_SIZE, |
818 | GNUNET_NO); | 818 | GNUNET_NO); |
819 | pnc = GNUNET_PEERINFO_notify (GST_cfg, GNUNET_YES, &process_peerinfo_hello, NULL); | 819 | pnc = GNUNET_PEERINFO_notify (GST_cfg, GNUNET_YES, &process_peerinfo_hello, NULL); |
820 | } | 820 | } |
@@ -828,9 +828,9 @@ GST_validation_stop () | |||
828 | { | 828 | { |
829 | struct CheckHelloValidatedContext *chvc; | 829 | struct CheckHelloValidatedContext *chvc; |
830 | 830 | ||
831 | GNUNET_CONTAINER_multihashmap_iterate (validation_map, | 831 | GNUNET_CONTAINER_multipeermap_iterate (validation_map, |
832 | &cleanup_validation_entry, NULL); | 832 | &cleanup_validation_entry, NULL); |
833 | GNUNET_CONTAINER_multihashmap_destroy (validation_map); | 833 | GNUNET_CONTAINER_multipeermap_destroy (validation_map); |
834 | validation_map = NULL; | 834 | validation_map = NULL; |
835 | while (NULL != (chvc = chvc_head)) | 835 | while (NULL != (chvc = chvc_head)) |
836 | { | 836 | { |
@@ -1031,7 +1031,7 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender, | |||
1031 | 1031 | ||
1032 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1032 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1033 | "I am `%s', sending PONG to peer `%s'\n", | 1033 | "I am `%s', sending PONG to peer `%s'\n", |
1034 | GNUNET_h2s (&GST_my_identity.hashPubKey), | 1034 | GNUNET_i2s_full (&GST_my_identity), |
1035 | GNUNET_i2s (sender)); | 1035 | GNUNET_i2s (sender)); |
1036 | 1036 | ||
1037 | /* message with structure: | 1037 | /* message with structure: |
@@ -1404,10 +1404,10 @@ struct IteratorContext | |||
1404 | * @param cls the 'struct GST_ValidationIteratorContext' | 1404 | * @param cls the 'struct GST_ValidationIteratorContext' |
1405 | * @param key the peer's identity | 1405 | * @param key the peer's identity |
1406 | * @param value the 'struct ValidationEntry' | 1406 | * @param value the 'struct ValidationEntry' |
1407 | * @return GNUNET_OK (continue to iterate) | 1407 | * @return #GNUNET_OK (continue to iterate) |
1408 | */ | 1408 | */ |
1409 | static int | 1409 | static int |
1410 | iterate_addresses (void *cls, const struct GNUNET_HashCode * key, void *value) | 1410 | iterate_addresses (void *cls, const struct GNUNET_PeerIdentity *key, void *value) |
1411 | { | 1411 | { |
1412 | struct IteratorContext *ic = cls; | 1412 | struct IteratorContext *ic = cls; |
1413 | struct ValidationEntry *ve = value; | 1413 | struct ValidationEntry *ve = value; |
@@ -1434,8 +1434,8 @@ GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target, | |||
1434 | 1434 | ||
1435 | ic.cb = cb; | 1435 | ic.cb = cb; |
1436 | ic.cb_cls = cb_cls; | 1436 | ic.cb_cls = cb_cls; |
1437 | GNUNET_CONTAINER_multihashmap_get_multiple (validation_map, | 1437 | GNUNET_CONTAINER_multipeermap_get_multiple (validation_map, |
1438 | &target->hashPubKey, | 1438 | target, |
1439 | &iterate_addresses, &ic); | 1439 | &iterate_addresses, &ic); |
1440 | } | 1440 | } |
1441 | 1441 | ||