aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-23 17:36:38 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-23 17:36:38 +0000
commitf6e78410faa57f57c0d82690c67e4fcb25f96bab (patch)
tree11d6ed87735eb444b911ad9bb2bcabf7bd1ba18c
parent2665611db7c4267bd765b3f9f4478629390ecc31 (diff)
downloadgnunet-f6e78410faa57f57c0d82690c67e4fcb25f96bab.tar.gz
gnunet-f6e78410faa57f57c0d82690c67e4fcb25f96bab.zip
fixing quota violation messages
-rw-r--r--src/transport/gnunet-service-transport.c18
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c10
2 files changed, 9 insertions, 19 deletions
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,
292#if 1 292#if 1
293 /* FIXME: this should not be needed, and not sure it's good to have it, but without 293 /* FIXME: this should not be needed, and not sure it's good to have it, but without
294 this connections seem to go extra-slow */ 294 this connections seem to go extra-slow */
295 if ((ats_count > 0) && (ats != NULL)) 295 GNUNET_ATS_address_update (GST_ats, peer,
296 { 296 plugin_name, sender_address, sender_address_len,
297 if (NULL != session) 297 session,
298 GNUNET_log_from (GNUNET_ERROR_TYPE_INFO | GNUNET_ERROR_TYPE_BULK, 298 ats, ats_count);
299 "transport-ats",
300 "Giving ATS session %p of plugin %s for peer %s\n",
301 session,
302 plugin_name,
303 GNUNET_i2s (peer));
304 GNUNET_ATS_address_update (GST_ats, peer,
305 plugin_name, sender_address, sender_address_len,
306 session,
307 ats, ats_count);
308 }
309#endif 299#endif
310#if DEBUG_TRANSPORT 300#if DEBUG_TRANSPORT
311 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 301 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
969 n = lookup_neighbour (sender); 969 n = lookup_neighbour (sender);
970 if (n == NULL) 970 if (n == NULL)
971 { 971 {
972 GNUNET_STATISTICS_update (GST_stats,
973 gettext_noop
974 ("# messages discarded due to lack of neighbour record"),
975 1, GNUNET_NO);
976 GST_neighbours_try_connect (sender); 972 GST_neighbours_try_connect (sender);
977 n = lookup_neighbour (sender); 973 n = lookup_neighbour (sender);
978 if (NULL == n) 974 if (NULL == n)
979 { 975 {
976 GNUNET_STATISTICS_update (GST_stats,
977 gettext_noop
978 ("# messages discarded due to lack of neighbour record"),
979 1, GNUNET_NO);
980 *do_forward = GNUNET_NO; 980 *do_forward = GNUNET_NO;
981 return GNUNET_TIME_UNIT_ZERO; 981 return GNUNET_TIME_UNIT_ZERO;
982 } 982 }
@@ -1020,7 +1020,7 @@ GST_neighbours_calculate_receive_delay (const struct GNUNET_PeerIdentity
1020 return GNUNET_CONSTANTS_QUOTA_VIOLATION_TIMEOUT; 1020 return GNUNET_CONSTANTS_QUOTA_VIOLATION_TIMEOUT;
1021 } 1021 }
1022 *do_forward = GNUNET_YES; 1022 *do_forward = GNUNET_YES;
1023 ret = GNUNET_BANDWIDTH_tracker_get_delay (&n->in_tracker, 0); 1023 ret = GNUNET_BANDWIDTH_tracker_get_delay (&n->in_tracker, 32 * 1024);
1024 if (ret.rel_value > 0) 1024 if (ret.rel_value > 0)
1025 { 1025 {
1026#if DEBUG_TRANSPORT 1026#if DEBUG_TRANSPORT