From ef98e4c68e05e88ced677d66b9e5b57a382df70d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 21 Apr 2011 13:29:22 +0000 Subject: fix --- src/fs/gnunet-service-fs_lc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/fs/gnunet-service-fs_lc.c') diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c index 3908b8a55..58a1a0933 100644 --- a/src/fs/gnunet-service-fs_lc.c +++ b/src/fs/gnunet-service-fs_lc.c @@ -188,6 +188,7 @@ GSF_local_client_lookup_ (struct GNUNET_SERVER_Client *client) * expiration. * * @param cls user-specified closure + * @param eval evaluation of the result * @param pr handle to the original pending request * @param expiration when does 'data' expire? * @param type type of the block @@ -196,6 +197,7 @@ GSF_local_client_lookup_ (struct GNUNET_SERVER_Client *client) */ static void client_response_handler (void *cls, + enum GNUNET_BLOCK_EvaluationResult eval, struct GSF_PendingRequest *pr, struct GNUNET_TIME_Absolute expiration, enum GNUNET_BLOCK_Type type, @@ -242,6 +244,18 @@ client_response_handler (void *cls, GNUNET_h2s (&prd->query), (unsigned int) prd->type); #endif + if (eval != GNUNET_BLOCK_EVALUATION_OK_LAST) + return; + GNUNET_CONTAINER_DLL_remove (lc->cr_head, + lc->cr_tail, + cr); + GSF_pending_request_cancel_ (cr->pr); + GNUNET_STATISTICS_update (GSF_stats, + gettext_noop ("# client searches active"), + - 1, + GNUNET_NO); + GNUNET_free (cr); + } -- cgit v1.2.3