diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-04-06 11:09:44 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-04-06 11:09:44 +0000 |
commit | 85a2e0d5b24495e0b2595a76a3205c4970a71fce (patch) | |
tree | db95c013f061d68ae4b6a65e0d196703ea33777a /src/transport | |
parent | 46c8217e87a0be0550b88ae9bafc4760305eabfa (diff) | |
download | gnunet-85a2e0d5b24495e0b2595a76a3205c4970a71fce.tar.gz gnunet-85a2e0d5b24495e0b2595a76a3205c4970a71fce.zip |
bwtracking
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-service-transport.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 7c2c0eadd..5dcbc4baa 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -1161,6 +1161,7 @@ find_ready_address(struct NeighbourList *neighbour) | |||
1161 | addresses = head->addresses; | 1161 | addresses = head->addresses; |
1162 | while (addresses != NULL) | 1162 | while (addresses != NULL) |
1163 | { | 1163 | { |
1164 | #if DEBUG_TRANSPORT > 1 | ||
1164 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1165 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1165 | "Have address `%s' for peer `%4s' (status: %d, %d, %d, %u, %llums, %u)\n", | 1166 | "Have address `%s' for peer `%4s' (status: %d, %d, %d, %u, %llums, %u)\n", |
1166 | GNUNET_a2s (addresses->addr, | 1167 | GNUNET_a2s (addresses->addr, |
@@ -1172,6 +1173,7 @@ find_ready_address(struct NeighbourList *neighbour) | |||
1172 | addresses->connect_attempts, | 1173 | addresses->connect_attempts, |
1173 | (unsigned long long) addresses->timeout.value, | 1174 | (unsigned long long) addresses->timeout.value, |
1174 | (unsigned int) addresses->distance); | 1175 | (unsigned int) addresses->distance); |
1176 | #endif | ||
1175 | if ( ( (best_address == NULL) || | 1177 | if ( ( (best_address == NULL) || |
1176 | (addresses->connected == GNUNET_YES) || | 1178 | (addresses->connected == GNUNET_YES) || |
1177 | (best_address->connected == GNUNET_NO) ) && | 1179 | (best_address->connected == GNUNET_NO) ) && |
@@ -1237,9 +1239,11 @@ try_transmission_to_peer (struct NeighbourList *neighbour) | |||
1237 | 1239 | ||
1238 | if (neighbour->messages_head == NULL) | 1240 | if (neighbour->messages_head == NULL) |
1239 | { | 1241 | { |
1242 | #if DEBUG_TRANSPORT | ||
1240 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1243 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1241 | "Transmission queue for `%4s' is empty\n", | 1244 | "Transmission queue for `%4s' is empty\n", |
1242 | GNUNET_i2s (&neighbour->id)); | 1245 | GNUNET_i2s (&neighbour->id)); |
1246 | #endif | ||
1243 | return; /* nothing to do */ | 1247 | return; /* nothing to do */ |
1244 | } | 1248 | } |
1245 | rl = NULL; | 1249 | rl = NULL; |
@@ -3174,6 +3178,12 @@ plugin_env_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
3174 | (ssize_t) msize)) | 3178 | (ssize_t) msize)) |
3175 | { | 3179 | { |
3176 | n->quota_violation_count++; | 3180 | n->quota_violation_count++; |
3181 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING | | ||
3182 | GNUNET_ERROR_TYPE_BULK, | ||
3183 | _ | ||
3184 | ("Bandwidth quota (%u b/s) violation detected (total of %u).\n"), | ||
3185 | n->in_tracker.available_bytes_per_s__, | ||
3186 | n->quota_violation_count); | ||
3177 | if (n->quota_violation_count > QUOTA_VIOLATION_DROP_THRESHOLD) | 3187 | if (n->quota_violation_count > QUOTA_VIOLATION_DROP_THRESHOLD) |
3178 | { | 3188 | { |
3179 | /* since we'll be dropping, only count this message for half so that | 3189 | /* since we'll be dropping, only count this message for half so that |