From: Christian Grothoff Date: Sun, 23 Oct 2011 17:36:38 +0000 (+0000) Subject: fixing quota violation messages X-Git-Tag: initial-import-from-subversion-38251~16312 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f6e78410faa57f57c0d82690c67e4fcb25f96bab;p=oweals%2Fgnunet.git fixing quota violation messages --- diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 691319c33..4f03d2e46 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -292,20 +292,10 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, #if 1 /* FIXME: this should not be needed, and not sure it's good to have it, but without this connections seem to go extra-slow */ - if ((ats_count > 0) && (ats != NULL)) - { - if (NULL != session) - GNUNET_log_from (GNUNET_ERROR_TYPE_INFO | GNUNET_ERROR_TYPE_BULK, - "transport-ats", - "Giving ATS session %p of plugin %s for peer %s\n", - session, - plugin_name, - GNUNET_i2s (peer)); - GNUNET_ATS_address_update (GST_ats, peer, - plugin_name, sender_address, sender_address_len, - session, - ats, ats_count); - } + GNUNET_ATS_address_update (GST_ats, peer, + plugin_name, sender_address, sender_address_len, + session, + ats, ats_count); #endif #if DEBUG_TRANSPORT GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 802a2cf32..e1e8b8988 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c @@ -969,14 +969,14 @@ GST_neighbours_calculate_receive_delay (const struct GNUNET_PeerIdentity n = lookup_neighbour (sender); if (n == NULL) { - GNUNET_STATISTICS_update (GST_stats, - gettext_noop - ("# messages discarded due to lack of neighbour record"), - 1, GNUNET_NO); GST_neighbours_try_connect (sender); n = lookup_neighbour (sender); if (NULL == n) { + GNUNET_STATISTICS_update (GST_stats, + gettext_noop + ("# messages discarded due to lack of neighbour record"), + 1, GNUNET_NO); *do_forward = GNUNET_NO; return GNUNET_TIME_UNIT_ZERO; } @@ -1020,7 +1020,7 @@ GST_neighbours_calculate_receive_delay (const struct GNUNET_PeerIdentity return GNUNET_CONSTANTS_QUOTA_VIOLATION_TIMEOUT; } *do_forward = GNUNET_YES; - ret = GNUNET_BANDWIDTH_tracker_get_delay (&n->in_tracker, 0); + ret = GNUNET_BANDWIDTH_tracker_get_delay (&n->in_tracker, 32 * 1024); if (ret.rel_value > 0) { #if DEBUG_TRANSPORT