diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-11-05 19:20:09 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-11-05 19:20:09 +0000 |
commit | 7f54be6572be560f2ca9786a72f355dae86ad51d (patch) | |
tree | e24e4326c1fb4f2676cfa1b86e2d2d5e34cab8bf /src/fs/gnunet-service-fs_pe.c | |
parent | 4d128503d51fe0ef710ac8a64e704b7d8148883c (diff) | |
download | gnunet-7f54be6572be560f2ca9786a72f355dae86ad51d.tar.gz gnunet-7f54be6572be560f2ca9786a72f355dae86ad51d.zip |
-fix block download calculation
Diffstat (limited to 'src/fs/gnunet-service-fs_pe.c')
-rw-r--r-- | src/fs/gnunet-service-fs_pe.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c index 853197964..c7cac75c4 100644 --- a/src/fs/gnunet-service-fs_pe.c +++ b/src/fs/gnunet-service-fs_pe.c | |||
@@ -700,7 +700,7 @@ GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp) | |||
700 | * | 700 | * |
701 | * @param pr_head request plan reference list to check. | 701 | * @param pr_head request plan reference list to check. |
702 | * @param sender the peer that we've sent the request to. | 702 | * @param sender the peer that we've sent the request to. |
703 | * @param result the timestamp to fill. | 703 | * @param result the timestamp to fill, set to "FOREVER" if never transmitted |
704 | * @return GNUNET_YES if 'result' was changed, GNUNET_NO otherwise. | 704 | * @return GNUNET_YES if 'result' was changed, GNUNET_NO otherwise. |
705 | */ | 705 | */ |
706 | int | 706 | int |
@@ -714,7 +714,10 @@ GSF_request_plan_reference_get_last_transmission_ ( | |||
714 | { | 714 | { |
715 | if (bi->rp->pp->cp == sender) | 715 | if (bi->rp->pp->cp == sender) |
716 | { | 716 | { |
717 | *result = bi->rp->last_transmission; | 717 | if (0 == bi->rp->last_transmission.abs_value) |
718 | *result = GNUNET_TIME_UNIT_FOREVER_ABS; | ||
719 | else | ||
720 | *result = bi->rp->last_transmission; | ||
718 | return GNUNET_YES; | 721 | return GNUNET_YES; |
719 | } | 722 | } |
720 | } | 723 | } |