diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-22 20:22:59 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-22 20:22:59 +0000 |
commit | 9ffd65f2427a9f553eb5390800c3a6191d0bfb8a (patch) | |
tree | a3a90579b5bb24a0f863a15837358e98dbca19a1 /src/transport/gnunet-service-transport.c | |
parent | 3a81c3e236a3679c0c0676d814c71d9ae5f38ec3 (diff) | |
download | gnunet-9ffd65f2427a9f553eb5390800c3a6191d0bfb8a.tar.gz gnunet-9ffd65f2427a9f553eb5390800c3a6191d0bfb8a.zip |
fixing 1836
Diffstat (limited to 'src/transport/gnunet-service-transport.c')
-rw-r--r-- | src/transport/gnunet-service-transport.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 602a597e5..bbbb6f78b 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -412,20 +412,30 @@ ats_request_address_change (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
412 | GST_neighbours_force_disconnect(peer); | 412 | GST_neighbours_force_disconnect(peer); |
413 | return; | 413 | return; |
414 | } | 414 | } |
415 | 415 | if (GNUNET_YES != | |
416 | GST_neighbours_switch_to_address (peer, plugin_name, plugin_addr, | 416 | GST_neighbours_switch_to_address (peer, plugin_name, plugin_addr, |
417 | plugin_addr_len, session, ats, ats_count); | 417 | plugin_addr_len, session, ats, ats_count)) |
418 | { | ||
419 | #if DEBUG_TRANSPORT | ||
420 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
421 | "Connection is not yet up, ignoring quota for now\n"); | ||
422 | #endif | ||
423 | /* FIXME: maybe we should let ATS know somehow? This is a problem | ||
424 | with the design; ATS may assign bandwidth, but we don't use it; | ||
425 | the current ATS API doesn't give us a good way to sync the | ||
426 | connection status between ATS and TRANSPORT */ | ||
427 | return; | ||
428 | } | ||
418 | #if DEBUG_TRANSPORT | 429 | #if DEBUG_TRANSPORT |
419 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 430 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
420 | "Sending outbound quota of %u Bps for peer `%s' to all clients\n", | 431 | "Sending outbound quota of %u Bps for peer `%s' to all clients\n", |
421 | ntohl (bandwidth_out.value__), GNUNET_i2s (peer)); | 432 | ntohl (bandwidth_out.value__), GNUNET_i2s (peer)); |
422 | #endif | 433 | #endif |
423 | msg.header.size = htons (sizeof (struct QuotaSetMessage)); | 434 | msg.header.size = htons (sizeof (struct QuotaSetMessage)); |
424 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA); | 435 | msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA); |
425 | msg.quota = bandwidth_out; | 436 | msg.quota = bandwidth_out; |
426 | msg.peer = (*peer); | 437 | msg.peer = (*peer); |
427 | GST_clients_broadcast (&msg.header, GNUNET_NO); | 438 | GST_clients_broadcast (&msg.header, GNUNET_NO); |
428 | |||
429 | #if DEBUG_TRANSPORT | 439 | #if DEBUG_TRANSPORT |
430 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 440 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
431 | "Setting inbound quota of %u for peer `%s' to \n", | 441 | "Setting inbound quota of %u for peer `%s' to \n", |