diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-19 09:38:36 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-19 09:38:36 +0000 |
commit | 10a0f31b2d73f188104be40d9c9c5057ffe6c788 (patch) | |
tree | 5fb5e295f9a5b3046a1f65e4beecec0bf7c63308 /src/fs | |
parent | 1ac596f8ff18fbedf0ef5c38c8d9c18ccee20705 (diff) | |
download | gnunet-10a0f31b2d73f188104be40d9c9c5057ffe6c788.tar.gz gnunet-10a0f31b2d73f188104be40d9c9c5057ffe6c788.zip |
no latency can happen, should be rare
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 69fb75be6..49b01724f 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -335,14 +335,9 @@ get_latency (const struct GNUNET_TRANSPORT_ATS_Information *atsi) | |||
335 | atsi++; | 335 | atsi++; |
336 | if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) | 336 | if (ntohl (atsi->type) == GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR) |
337 | { | 337 | { |
338 | static int once; | 338 | /* We sometime have no latency data, i.e. if the address came from |
339 | 339 | peerinfo and we never had a chance to play transport-level | |
340 | if (!once) | 340 | PING/PONG yet. Assume 1s in that case. */ |
341 | { | ||
342 | once = 1; | ||
343 | GNUNET_break (0); | ||
344 | } | ||
345 | /* how can we not have latency data? */ | ||
346 | return GNUNET_TIME_UNIT_SECONDS; | 341 | return GNUNET_TIME_UNIT_SECONDS; |
347 | } | 342 | } |
348 | return GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, | 343 | return GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, |