diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-22 22:10:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-22 22:10:15 +0000 |
commit | b7585254768daa9b64fc33fb2562293c6fe3fc16 (patch) | |
tree | 3e5f824c8ad07a37988a7605bce47e85ffe58943 /src/transport/gnunet-service-transport_validation.c | |
parent | 15a1ecaaeb9aa1aebba7404993e1b6945bbc014e (diff) | |
download | gnunet-b7585254768daa9b64fc33fb2562293c6fe3fc16.tar.gz gnunet-b7585254768daa9b64fc33fb2562293c6fe3fc16.zip |
simplify logic, do not report monitoring events for sessions in destroy, indentation, doxygen -- may help/fix #3591
Diffstat (limited to 'src/transport/gnunet-service-transport_validation.c')
-rw-r--r-- | src/transport/gnunet-service-transport_validation.c | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index de6edc90a..ee8cd9308 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -1524,9 +1524,13 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender, | |||
1524 | /* build HELLO to store in PEERINFO */ | 1524 | /* build HELLO to store in PEERINFO */ |
1525 | ve->copied = GNUNET_NO; | 1525 | ve->copied = GNUNET_NO; |
1526 | hello = GNUNET_HELLO_create (&ve->address->peer.public_key, | 1526 | hello = GNUNET_HELLO_create (&ve->address->peer.public_key, |
1527 | &add_valid_peer_address, ve, | 1527 | &add_valid_peer_address, |
1528 | ve, | ||
1528 | GNUNET_NO); | 1529 | GNUNET_NO); |
1529 | GNUNET_PEERINFO_add_peer (GST_peerinfo, hello, NULL, NULL); | 1530 | GNUNET_PEERINFO_add_peer (GST_peerinfo, |
1531 | hello, | ||
1532 | NULL, | ||
1533 | NULL); | ||
1530 | GNUNET_free (hello); | 1534 | GNUNET_free (hello); |
1531 | return GNUNET_OK; | 1535 | return GNUNET_OK; |
1532 | } | 1536 | } |
@@ -1565,26 +1569,10 @@ GST_validation_handle_hello (const struct GNUNET_MessageHeader *hello) | |||
1565 | /* got our own HELLO, how boring */ | 1569 | /* got our own HELLO, how boring */ |
1566 | return GNUNET_OK; | 1570 | return GNUNET_OK; |
1567 | } | 1571 | } |
1568 | if (GNUNET_NO == | 1572 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1569 | GNUNET_CONTAINER_multipeermap_contains (validation_map, | 1573 | "Validation received HELLO message for peer `%s' with size %u, checking for new addresses\n", |
1570 | &pid)) | 1574 | GNUNET_i2s (&pid), |
1571 | { | 1575 | ntohs (hello->size)); |
1572 | /* Add peer identity without addresses to peerinfo service */ | ||
1573 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1574 | "Adding HELLO without addresses for peer `%s'\n", | ||
1575 | GNUNET_i2s (&pid)); | ||
1576 | h = GNUNET_HELLO_create (&pid.public_key, NULL, NULL, friend); | ||
1577 | GNUNET_PEERINFO_add_peer (GST_peerinfo, h, NULL, NULL); | ||
1578 | |||
1579 | GNUNET_free (h); | ||
1580 | } | ||
1581 | else | ||
1582 | { | ||
1583 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1584 | "Validation received HELLO message for peer `%s' with size %u, checking for new addresses\n", | ||
1585 | GNUNET_i2s (&pid), | ||
1586 | ntohs (hello->size)); | ||
1587 | } | ||
1588 | GNUNET_assert (NULL == | 1576 | GNUNET_assert (NULL == |
1589 | GNUNET_HELLO_iterate_addresses (hm, | 1577 | GNUNET_HELLO_iterate_addresses (hm, |
1590 | GNUNET_NO, | 1578 | GNUNET_NO, |