diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-19 14:09:50 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-19 14:09:50 +0000 |
commit | e79f6019ce2f082bd247e1d4fca950d0c7cb7b57 (patch) | |
tree | 73aeea23d0369416c746a69065c695d7ed023b9f /src/fs/gnunet-service-fs.c | |
parent | 24bd0eabe9599e8c3da2f86aeed49ba53d52816a (diff) | |
download | gnunet-e79f6019ce2f082bd247e1d4fca950d0c7cb7b57.tar.gz gnunet-e79f6019ce2f082bd247e1d4fca950d0c7cb7b57.zip |
prevent loopback routing, add some statistics, faster re-transmit
Diffstat (limited to 'src/fs/gnunet-service-fs.c')
-rw-r--r-- | src/fs/gnunet-service-fs.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index bf6984dd6..6ea47c2e2 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c | |||
@@ -258,6 +258,15 @@ consider_request_for_forwarding (void *cls, | |||
258 | { | 258 | { |
259 | struct GSF_PendingRequest *pr = cls; | 259 | struct GSF_PendingRequest *pr = cls; |
260 | 260 | ||
261 | if (GNUNET_YES != | ||
262 | GSF_pending_request_test_target_ (pr, | ||
263 | peer)) | ||
264 | { | ||
265 | GNUNET_STATISTICS_update (GSF_stats, | ||
266 | gettext_noop ("# Loopback routes suppressed"), 1, | ||
267 | GNUNET_NO); | ||
268 | return; | ||
269 | } | ||
261 | GSF_plan_add_ (cp, pr); | 270 | GSF_plan_add_ (cp, pr); |
262 | } | 271 | } |
263 | 272 | ||
@@ -430,7 +439,12 @@ consider_peer_for_forwarding (void *cls, const GNUNET_HashCode * key, | |||
430 | if (GNUNET_YES != | 439 | if (GNUNET_YES != |
431 | GSF_pending_request_test_target_ (pr, | 440 | GSF_pending_request_test_target_ (pr, |
432 | &pid)) | 441 | &pid)) |
442 | { | ||
443 | GNUNET_STATISTICS_update (GSF_stats, | ||
444 | gettext_noop ("# Loopback routes suppressed"), 1, | ||
445 | GNUNET_NO); | ||
433 | return GNUNET_YES; | 446 | return GNUNET_YES; |
447 | } | ||
434 | GSF_plan_add_ (cp, pr); | 448 | GSF_plan_add_ (cp, pr); |
435 | return GNUNET_YES; | 449 | return GNUNET_YES; |
436 | } | 450 | } |