aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-07-15 14:06:37 +0000
committerChristian Grothoff <christian@grothoff.org>2011-07-15 14:06:37 +0000
commit73999f04384930f0f7fe7a562bafae798fdf2e95 (patch)
tree7b3ff59035467814433063c5cb0d2ccfa381c424 /src/transport/gnunet-service-transport.c
parent36ea0cda927fb838aaac49b0e0a05407c0b6a499 (diff)
downloadgnunet-73999f04384930f0f7fe7a562bafae798fdf2e95.tar.gz
gnunet-73999f04384930f0f7fe7a562bafae798fdf2e95.zip
trying to do something about 1728
Diffstat (limited to 'src/transport/gnunet-service-transport.c')
-rw-r--r--src/transport/gnunet-service-transport.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 5210d728e..6676154f2 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -2228,7 +2228,7 @@ refresh_hello_task (void *cls,
2228 GNUNET_PEERINFO_add_peer (peerinfo, our_hello); 2228 GNUNET_PEERINFO_add_peer (peerinfo, our_hello);
2229 for (npos = neighbours; npos != NULL; npos = npos->next) 2229 for (npos = neighbours; npos != NULL; npos = npos->next)
2230 { 2230 {
2231 if (! npos->received_pong) 2231 if (GNUNET_YES != npos->received_pong)
2232 continue; 2232 continue;
2233#if DEBUG_TRANSPORT 2233#if DEBUG_TRANSPORT
2234 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, 2234 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
@@ -4883,7 +4883,10 @@ disconnect_neighbour (struct NeighbourList *n, int check)
4883 4883
4884 /* notify all clients about disconnect */ 4884 /* notify all clients about disconnect */
4885 if (GNUNET_YES == n->received_pong) 4885 if (GNUNET_YES == n->received_pong)
4886 notify_clients_disconnect (&n->id); 4886 {
4887 n->received_pong = GNUNET_NO;
4888 notify_clients_disconnect (&n->id);
4889 }
4887 4890
4888 ats_modify_problem_state(ats, ATS_MODIFIED); 4891 ats_modify_problem_state(ats, ATS_MODIFIED);
4889 4892
@@ -5450,7 +5453,7 @@ plugin_env_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
5450 break; 5453 break;
5451 case GNUNET_MESSAGE_TYPE_TRANSPORT_PING: 5454 case GNUNET_MESSAGE_TYPE_TRANSPORT_PING:
5452 handle_ping (plugin, message, peer, session, sender_address, sender_address_len); 5455 handle_ping (plugin, message, peer, session, sender_address, sender_address_len);
5453 if (! n->received_pong) 5456 if (GNUNET_YES != n->received_pong)
5454 transmit_plain_ping (n); 5457 transmit_plain_ping (n);
5455 break; 5458 break;
5456 case GNUNET_MESSAGE_TYPE_TRANSPORT_PONG: 5459 case GNUNET_MESSAGE_TYPE_TRANSPORT_PONG:
@@ -5560,10 +5563,10 @@ handle_start (void *cls,
5560 { 5563 {
5561 if (GNUNET_YES == n->received_pong) 5564 if (GNUNET_YES == n->received_pong)
5562 { 5565 {
5563 (&(cim->ats))[0].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE); 5566 (&cim->ats)[0].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DISTANCE);
5564 (&(cim->ats))[0].value = htonl (n->distance); 5567 (&cim->ats)[0].value = htonl (n->distance);
5565 (&(cim->ats))[1].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY); 5568 (&cim->ats)[1].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY);
5566 (&(cim->ats))[1].value = htonl ((uint32_t) n->latency.rel_value); 5569 (&cim->ats)[1].value = htonl ((uint32_t) n->latency.rel_value);
5567 cim->id = n->id; 5570 cim->id = n->id;
5568 transmit_to_client (c, &cim->header, GNUNET_NO); 5571 transmit_to_client (c, &cim->header, GNUNET_NO);
5569 } 5572 }