diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-08 09:23:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-08 09:23:47 +0000 |
commit | 539be627c009c2f13da19d6ae847168c1f5d496e (patch) | |
tree | 78814fdb491c52349f793af5898858a56e32117a /src/fs/gnunet-service-fs_pe.c | |
parent | 941c7ee262792114da1811cf4404b04550e071b1 (diff) | |
download | gnunet-539be627c009c2f13da19d6ae847168c1f5d496e.tar.gz gnunet-539be627c009c2f13da19d6ae847168c1f5d496e.zip |
-LRN: my experimental block download time measurer. The results
can be found there - [1].
[1] http://lrn.no-ip.info/other/gnunet_download_tie.log
Diffstat (limited to 'src/fs/gnunet-service-fs_pe.c')
-rw-r--r-- | src/fs/gnunet-service-fs_pe.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/fs/gnunet-service-fs_pe.c b/src/fs/gnunet-service-fs_pe.c index 0a40065cc..78769fa82 100644 --- a/src/fs/gnunet-service-fs_pe.c +++ b/src/fs/gnunet-service-fs_pe.c | |||
@@ -699,6 +699,31 @@ GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp) | |||
699 | GNUNET_free (pp); | 699 | GNUNET_free (pp); |
700 | } | 700 | } |
701 | 701 | ||
702 | /** | ||
703 | * Get the last transmission attempt time for the request plan list | ||
704 | * referenced by @rpr_head, that was sent to @sender | ||
705 | * | ||
706 | * @param rpr_head request plan reference list to check. | ||
707 | * @param sender the peer that we've sent the request to. | ||
708 | * @param result the timestamp to fill. | ||
709 | * @return GNUNET_YES if @result was changed, GNUNET_NO otherwise. | ||
710 | */ | ||
711 | int | ||
712 | GSF_request_plan_reference_get_last_transmission_ ( | ||
713 | struct GSF_RequestPlanReference *rpr_head, struct GSF_ConnectedPeer *sender, | ||
714 | struct GNUNET_TIME_Absolute *result) | ||
715 | { | ||
716 | struct GSF_RequestPlanReference *rpr; | ||
717 | for (rpr = rpr_head; rpr; rpr = rpr->next) | ||
718 | { | ||
719 | if (rpr->rp->pp->cp == sender) | ||
720 | { | ||
721 | *result = rpr->rp->last_transmission; | ||
722 | return GNUNET_YES; | ||
723 | } | ||
724 | } | ||
725 | return GNUNET_NO; | ||
726 | } | ||
702 | 727 | ||
703 | /** | 728 | /** |
704 | * Notify the plan about a request being done; destroy all entries | 729 | * Notify the plan about a request being done; destroy all entries |