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_lc.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_lc.c')
-rw-r--r-- | src/fs/gnunet-service-fs_lc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c index d8f7d5cb3..6eb054acd 100644 --- a/src/fs/gnunet-service-fs_lc.c +++ b/src/fs/gnunet-service-fs_lc.c | |||
@@ -218,6 +218,7 @@ client_request_destroy (void *cls, | |||
218 | * @param pr handle to the original pending request | 218 | * @param pr handle to the original pending request |
219 | * @param reply_anonymity_level anonymity level for the reply, UINT32_MAX for "unknown" | 219 | * @param reply_anonymity_level anonymity level for the reply, UINT32_MAX for "unknown" |
220 | * @param expiration when does 'data' expire? | 220 | * @param expiration when does 'data' expire? |
221 | * @param last_transmission when was the last time we've tried to download this block? (FOREVER if unknown) | ||
221 | * @param type type of the block | 222 | * @param type type of the block |
222 | * @param data response data, NULL on request expiration | 223 | * @param data response data, NULL on request expiration |
223 | * @param data_len number of bytes in data | 224 | * @param data_len number of bytes in data |
@@ -227,12 +228,13 @@ client_response_handler (void *cls, enum GNUNET_BLOCK_EvaluationResult eval, | |||
227 | struct GSF_PendingRequest *pr, | 228 | struct GSF_PendingRequest *pr, |
228 | uint32_t reply_anonymity_level, | 229 | uint32_t reply_anonymity_level, |
229 | struct GNUNET_TIME_Absolute expiration, | 230 | struct GNUNET_TIME_Absolute expiration, |
231 | struct GNUNET_TIME_Absolute last_transmission, | ||
230 | enum GNUNET_BLOCK_Type type, const void *data, | 232 | enum GNUNET_BLOCK_Type type, const void *data, |
231 | size_t data_len) | 233 | size_t data_len) |
232 | { | 234 | { |
233 | struct ClientRequest *cr = cls; | 235 | struct ClientRequest *cr = cls; |
234 | struct GSF_LocalClient *lc; | 236 | struct GSF_LocalClient *lc; |
235 | struct PutMessage *pm; | 237 | struct ClientPutMessage *pm; |
236 | const struct GSF_PendingRequestData *prd; | 238 | const struct GSF_PendingRequestData *prd; |
237 | size_t msize; | 239 | size_t msize; |
238 | 240 | ||
@@ -255,15 +257,16 @@ client_response_handler (void *cls, enum GNUNET_BLOCK_EvaluationResult eval, | |||
255 | GNUNET_NO); | 257 | GNUNET_NO); |
256 | GNUNET_assert (pr == cr->pr); | 258 | GNUNET_assert (pr == cr->pr); |
257 | lc = cr->lc; | 259 | lc = cr->lc; |
258 | msize = sizeof (struct PutMessage) + data_len; | 260 | msize = sizeof (struct ClientPutMessage) + data_len; |
259 | { | 261 | { |
260 | char buf[msize]; | 262 | char buf[msize]; |
261 | 263 | ||
262 | pm = (struct PutMessage *) buf; | 264 | pm = (struct ClientPutMessage *) buf; |
263 | pm->header.type = htons (GNUNET_MESSAGE_TYPE_FS_PUT); | 265 | pm->header.type = htons (GNUNET_MESSAGE_TYPE_FS_PUT); |
264 | pm->header.size = htons (msize); | 266 | pm->header.size = htons (msize); |
265 | pm->type = htonl (type); | 267 | pm->type = htonl (type); |
266 | pm->expiration = GNUNET_TIME_absolute_hton (expiration); | 268 | pm->expiration = GNUNET_TIME_absolute_hton (expiration); |
269 | pm->last_transmission = GNUNET_TIME_absolute_hton (last_transmission); | ||
267 | memcpy (&pm[1], data, data_len); | 270 | memcpy (&pm[1], data, data_len); |
268 | GSF_local_client_transmit_ (lc, &pm->header); | 271 | GSF_local_client_transmit_ (lc, &pm->header); |
269 | } | 272 | } |