diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-06-24 15:01:50 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-06-24 15:01:50 +0000 |
commit | 53a78f82a5869e82fe441502bc0373755460a92a (patch) | |
tree | aa9dc996873e4ab0e22784c55d529fbc0804ce93 /src/dv | |
parent | ce3ae4e3310f52a9e7dc698fde3db32a252bc21b (diff) | |
download | gnunet-53a78f82a5869e82fe441502bc0373755460a92a.tar.gz gnunet-53a78f82a5869e82fe441502bc0373755460a92a.zip |
test unknown sender hypothesis
Diffstat (limited to 'src/dv')
-rw-r--r-- | src/dv/gnunet-service-dv.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/dv/gnunet-service-dv.c b/src/dv/gnunet-service-dv.c index f6fe314cd..e4a9d6633 100644 --- a/src/dv/gnunet-service-dv.c +++ b/src/dv/gnunet-service-dv.c | |||
@@ -1062,7 +1062,7 @@ send_message (const struct GNUNET_PeerIdentity * recipient, | |||
1062 | recipient_id = target->referrer_id; | 1062 | recipient_id = target->referrer_id; |
1063 | 1063 | ||
1064 | source = GNUNET_CONTAINER_multihashmap_get (extended_neighbors, | 1064 | source = GNUNET_CONTAINER_multihashmap_get (extended_neighbors, |
1065 | &sender->hashPubKey); | 1065 | &sender->hashPubKey); |
1066 | if (source == NULL) | 1066 | if (source == NULL) |
1067 | { | 1067 | { |
1068 | if (0 != (memcmp (&my_identity, | 1068 | if (0 != (memcmp (&my_identity, |
@@ -1116,6 +1116,10 @@ send_message (const struct GNUNET_PeerIdentity * recipient, | |||
1116 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: Sending DATA message. Sender id %u, source %s, destination %s, via %s\n", GNUNET_i2s(&my_identity), sender_id, &encPeerFrom, &encPeerTo, &encPeerVia); | 1116 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: Sending DATA message. Sender id %u, source %s, destination %s, via %s\n", GNUNET_i2s(&my_identity), sender_id, &encPeerFrom, &encPeerTo, &encPeerVia); |
1117 | #endif | 1117 | #endif |
1118 | memcpy (&toSend[1], message, message_size); | 1118 | memcpy (&toSend[1], message, message_size); |
1119 | if (source->pkey == NULL) /* Test our hypothesis about message failures! */ | ||
1120 | { | ||
1121 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "%s: Sending message, but anticipate recipient will not know sender!!!\n\n\n"); | ||
1122 | } | ||
1119 | GNUNET_CONTAINER_DLL_insert_after (core_pending_head, | 1123 | GNUNET_CONTAINER_DLL_insert_after (core_pending_head, |
1120 | core_pending_tail, | 1124 | core_pending_tail, |
1121 | core_pending_tail, | 1125 | core_pending_tail, |
@@ -2650,9 +2654,9 @@ process_peerinfo (void *cls, | |||
2650 | #endif | 2654 | #endif |
2651 | int sent; | 2655 | int sent; |
2652 | 2656 | ||
2653 | if (peer == NULL) /* && (neighbor->pkey == NULL))*/ | 2657 | if (peer == NULL) |
2654 | { | 2658 | { |
2655 | if (distant->pkey == NULL) /* FIXME: Reschedule? */ | 2659 | if (distant->pkey == NULL) |
2656 | { | 2660 | { |
2657 | #if DEBUG_DV | 2661 | #if DEBUG_DV |
2658 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Failed to get peerinfo information for this peer, retrying!\n"); | 2662 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Failed to get peerinfo information for this peer, retrying!\n"); |
@@ -2682,12 +2686,6 @@ process_peerinfo (void *cls, | |||
2682 | memcpy(distant->pkey, &neighbor->pkey, sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded)); | 2686 | memcpy(distant->pkey, &neighbor->pkey, sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded)); |
2683 | } | 2687 | } |
2684 | 2688 | ||
2685 | /* Why do it this way, now we have the distant neighbor! */ | ||
2686 | /*GNUNET_CONTAINER_multihashmap_get_multiple(extended_neighbors, | ||
2687 | &peer->hashPubKey, | ||
2688 | &add_pkey_to_extended, | ||
2689 | &neighbor->pkey);*/ | ||
2690 | |||
2691 | sent = GNUNET_CONTAINER_multihashmap_iterate (extended_neighbors, &add_all_extended_peers, neighbor->send_context); | 2689 | sent = GNUNET_CONTAINER_multihashmap_iterate (extended_neighbors, &add_all_extended_peers, neighbor->send_context); |
2692 | 2690 | ||
2693 | #if DEBUG_DV_PEER_NUMBERS | 2691 | #if DEBUG_DV_PEER_NUMBERS |