aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_pr.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-10-25 23:04:09 +0000
committerChristian Grothoff <christian@grothoff.org>2015-10-25 23:04:09 +0000
commita7fbcf1c827ea25046c9f9e5c4e2a567eba72318 (patch)
tree0dd1e0bca0cbbb8add221a70a00b9dc7b51a124c /src/fs/gnunet-service-fs_pr.c
parenta6d5893f9680dea995b1172f601adc27b2039b75 (diff)
downloadgnunet-a7fbcf1c827ea25046c9f9e5c4e2a567eba72318.tar.gz
gnunet-a7fbcf1c827ea25046c9f9e5c4e2a567eba72318.zip
check against all pending requests with same hash, not just first; this is a true multihashmap
Diffstat (limited to 'src/fs/gnunet-service-fs_pr.c')
-rw-r--r--src/fs/gnunet-service-fs_pr.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index a96610052..187687f17 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -422,10 +422,10 @@ int
422GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra, 422GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
423 struct GSF_PendingRequest *prb) 423 struct GSF_PendingRequest *prb)
424{ 424{
425 if ((pra->public_data.type != prb->public_data.type) || 425 if ( (pra->public_data.type != prb->public_data.type) ||
426 (0 != 426 (0 != memcmp (&pra->public_data.query,
427 memcmp (&pra->public_data.query, &prb->public_data.query, 427 &prb->public_data.query,
428 sizeof (struct GNUNET_HashCode)))) 428 sizeof (struct GNUNET_HashCode))))
429 return GNUNET_NO; 429 return GNUNET_NO;
430 return GNUNET_OK; 430 return GNUNET_OK;
431} 431}
@@ -656,7 +656,8 @@ clean_request (void *cls, const struct GNUNET_HashCode *key, void *value)
656 * @param full_cleanup fully purge the request 656 * @param full_cleanup fully purge the request
657 */ 657 */
658void 658void
659GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup) 659GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr,
660 int full_cleanup)
660{ 661{
661 GSF_LocalLookupContinuation cont; 662 GSF_LocalLookupContinuation cont;
662 663
@@ -677,7 +678,9 @@ GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup)
677 if (NULL != (cont = pr->llc_cont)) 678 if (NULL != (cont = pr->llc_cont))
678 { 679 {
679 pr->llc_cont = NULL; 680 pr->llc_cont = NULL;
680 cont (pr->llc_cont_cls, pr, pr->local_result); 681 cont (pr->llc_cont_cls,
682 pr,
683 pr->local_result);
681 } 684 }
682 GSF_plan_notify_request_done_ (pr); 685 GSF_plan_notify_request_done_ (pr);
683 if (NULL != pr->qe) 686 if (NULL != pr->qe)
@@ -698,7 +701,9 @@ GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup)
698 return; 701 return;
699 } 702 }
700 GNUNET_assert (GNUNET_YES == 703 GNUNET_assert (GNUNET_YES ==
701 clean_request (NULL, &pr->public_data.query, pr)); 704 clean_request (NULL,
705 &pr->public_data.query,
706 pr));
702} 707}
703 708
704 709