diff options
Diffstat (limited to 'src/transport/gnunet-service-transport_validation.c')
-rw-r--r-- | src/transport/gnunet-service-transport_validation.c | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index f0b8d9466..fb2791eba 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -1519,21 +1519,30 @@ GST_validation_handle_hello (const struct GNUNET_MessageHeader *hello) | |||
1519 | memcmp (&GST_my_identity, | 1519 | memcmp (&GST_my_identity, |
1520 | &pid, | 1520 | &pid, |
1521 | sizeof (struct GNUNET_PeerIdentity))) | 1521 | sizeof (struct GNUNET_PeerIdentity))) |
1522 | { | ||
1523 | /* got our own HELLO, how boring */ | ||
1522 | return GNUNET_OK; | 1524 | return GNUNET_OK; |
1523 | /* Add peer identity without addresses to peerinfo service */ | 1525 | } |
1524 | h = GNUNET_HELLO_create (&pid.public_key, NULL, NULL, friend); | 1526 | if (GNUNET_NO == |
1525 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 1527 | GNUNET_CONTAINER_multipeermap_contains (validation_map, |
1526 | _("Validation received new %s message for peer `%s' with size %u\n"), | 1528 | &pid)) |
1527 | "HELLO", | 1529 | { |
1528 | GNUNET_i2s (&pid), | 1530 | /* Add peer identity without addresses to peerinfo service */ |
1529 | ntohs (hello->size)); | 1531 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1530 | GNUNET_PEERINFO_add_peer (GST_peerinfo, h, NULL, NULL); | 1532 | "Adding HELLO without addresses for peer `%s'\n", |
1531 | 1533 | GNUNET_i2s (&pid)); | |
1532 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1534 | h = GNUNET_HELLO_create (&pid.public_key, NULL, NULL, friend); |
1533 | _("Adding `%s' without addresses for peer `%s'\n"), "HELLO", | 1535 | GNUNET_PEERINFO_add_peer (GST_peerinfo, h, NULL, NULL); |
1534 | GNUNET_i2s (&pid)); | ||
1535 | 1536 | ||
1536 | GNUNET_free (h); | 1537 | GNUNET_free (h); |
1538 | } | ||
1539 | else | ||
1540 | { | ||
1541 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1542 | "Validation received HELLO message for peer `%s' with size %u, checking for new addresses\n", | ||
1543 | GNUNET_i2s (&pid), | ||
1544 | ntohs (hello->size)); | ||
1545 | } | ||
1537 | GNUNET_assert (NULL == | 1546 | GNUNET_assert (NULL == |
1538 | GNUNET_HELLO_iterate_addresses (hm, | 1547 | GNUNET_HELLO_iterate_addresses (hm, |
1539 | GNUNET_NO, | 1548 | GNUNET_NO, |