diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-04-21 13:05:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-04-21 13:05:22 +0000 |
commit | 8b23412a0e353778e83b370260e40d63a18c3927 (patch) | |
tree | b2d8321ff0117ce7e394ec6c57e74d6c7d48be57 /src/fs/gnunet-service-fs_pr.c | |
parent | a8fbbd5cba5913f69c6f16e43c7c8cc8165a1f2a (diff) | |
download | gnunet-8b23412a0e353778e83b370260e40d63a18c3927.tar.gz gnunet-8b23412a0e353778e83b370260e40d63a18c3927.zip |
cancel completed requests
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.c')
-rw-r--r-- | src/fs/gnunet-service-fs_pr.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index 16389e130..f8ca82800 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c | |||
@@ -266,6 +266,12 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options, | |||
266 | struct GSF_PendingRequest *pr; | 266 | struct GSF_PendingRequest *pr; |
267 | struct GSF_PendingRequest *dpr; | 267 | struct GSF_PendingRequest *dpr; |
268 | 268 | ||
269 | #if DEBUG_FS | ||
270 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
271 | "Creating request handle for `%s' of type %d\n", | ||
272 | GNUNET_h2s (query), | ||
273 | type); | ||
274 | #endif | ||
269 | pr = GNUNET_malloc (sizeof (struct GSF_PendingRequest)); | 275 | pr = GNUNET_malloc (sizeof (struct GSF_PendingRequest)); |
270 | pr->public_data.query = *query; | 276 | pr->public_data.query = *query; |
271 | if (GNUNET_BLOCK_TYPE_FS_SBLOCK == type) | 277 | if (GNUNET_BLOCK_TYPE_FS_SBLOCK == type) |
@@ -446,7 +452,13 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr, | |||
446 | int64_t ttl; | 452 | int64_t ttl; |
447 | int do_route; | 453 | int do_route; |
448 | 454 | ||
449 | 455 | #if DEBUG_FS | |
456 | if (buf_size > 0) | ||
457 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
458 | "Building request message for `%s' of type %d\n", | ||
459 | GNUNET_h2s (&pr->public_data.query), | ||
460 | pr->public_data.type); | ||
461 | #endif | ||
450 | k = 0; | 462 | k = 0; |
451 | bm = 0; | 463 | bm = 0; |
452 | do_route = (0 == (pr->public_data.options & GSF_PRO_FORWARD_ONLY)); | 464 | do_route = (0 == (pr->public_data.options & GSF_PRO_FORWARD_ONLY)); |
@@ -697,6 +709,7 @@ process_reply (void *cls, | |||
697 | prq->expiration, | 709 | prq->expiration, |
698 | prq->type, | 710 | prq->type, |
699 | prq->data, prq->size); | 711 | prq->data, prq->size); |
712 | GSF_pending_request_cancel_ (pr); | ||
700 | return GNUNET_YES; | 713 | return GNUNET_YES; |
701 | case GNUNET_BLOCK_EVALUATION_OK_DUPLICATE: | 714 | case GNUNET_BLOCK_EVALUATION_OK_DUPLICATE: |
702 | GNUNET_STATISTICS_update (GSF_stats, | 715 | GNUNET_STATISTICS_update (GSF_stats, |