[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34496 - gnunet/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34496 - gnunet/src/fs |
Date: |
Sun, 7 Dec 2014 22:23:24 +0100 |
Author: grothoff
Date: 2014-12-07 22:23:24 +0100 (Sun, 07 Dec 2014)
New Revision: 34496
Modified:
gnunet/src/fs/gnunet-service-fs.c
gnunet/src/fs/gnunet-service-fs_lc.c
gnunet/src/fs/gnunet-service-fs_pr.c
Log:
fixing #3568
Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c 2014-12-07 20:59:58 UTC (rev 34495)
+++ gnunet/src/fs/gnunet-service-fs.c 2014-12-07 21:23:24 UTC (rev 34496)
@@ -400,18 +400,13 @@
struct GNUNET_SERVER_Client *client = cls;
struct GSF_PendingRequestData *prd;
+ GNUNET_SERVER_receive_done (client, GNUNET_OK);
+ if (GNUNET_BLOCK_EVALUATION_OK_LAST == result)
+ return; /* we're done, 'pr' was already destroyed... */
prd = GSF_pending_request_get_data_ (pr);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Finished database lookup for local request `%s' with result
%d\n",
GNUNET_h2s (&prd->query), result);
- GNUNET_SERVER_receive_done (client, GNUNET_OK);
- if (GNUNET_BLOCK_EVALUATION_OK_LAST == result)
- return; /* we're done, 'pr' was already destroyed... */
- if (0 != (GSF_PRO_LOCAL_ONLY & prd->options))
- {
- GSF_pending_request_cancel_ (pr, GNUNET_YES);
- return;
- }
if (0 == prd->anonymity_level)
{
switch (prd->type)
Modified: gnunet/src/fs/gnunet-service-fs_lc.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_lc.c 2014-12-07 20:59:58 UTC (rev
34495)
+++ gnunet/src/fs/gnunet-service-fs_lc.c 2014-12-07 21:23:24 UTC (rev
34496)
@@ -221,7 +221,7 @@
* @param last_transmission when was the last time we've tried to download
this block? (FOREVER if unknown)
* @param type type of the block
* @param data response data, NULL on request expiration
- * @param data_len number of bytes in data
+ * @param data_len number of bytes in @e data
*/
static void
client_response_handler (void *cls, enum GNUNET_BLOCK_EvaluationResult eval,
@@ -240,8 +240,10 @@
if (NULL == data)
{
- /* ugh, request 'timed out' -- how can this be? */
- GNUNET_break (0);
+ /* local-only request, with no result, clean up. */
+ if (GNUNET_SCHEDULER_NO_TASK == cr->kill_task)
+ cr->kill_task = GNUNET_SCHEDULER_add_now (&client_request_destroy,
+ cr);
return;
}
prd = GSF_pending_request_get_data_ (pr);
Modified: gnunet/src/fs/gnunet-service-fs_pr.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pr.c 2014-12-07 20:59:58 UTC (rev
34495)
+++ gnunet/src/fs/gnunet-service-fs_pr.c 2014-12-07 21:23:24 UTC (rev
34496)
@@ -128,7 +128,7 @@
GSF_LocalLookupContinuation llc_cont;
/**
- * Closure for llc_cont.
+ * Closure for @e llc_cont.
*/
void *llc_cont_cls;
@@ -1514,6 +1514,28 @@
if (NULL == (cont = pr->llc_cont))
return; /* no continuation */
pr->llc_cont = NULL;
+ if (0 != (GSF_PRO_LOCAL_ONLY & pr->public_data.options))
+ {
+ if (GNUNET_BLOCK_EVALUATION_OK_LAST != pr->local_result)
+ {
+ /* Signal that we are done and that there won't be any
+ additional results to allow client to clean up state. */
+ pr->rh (pr->rh_cls,
+ GNUNET_BLOCK_EVALUATION_OK_LAST,
+ pr,
+ UINT32_MAX,
+ GNUNET_TIME_UNIT_ZERO_ABS,
+ GNUNET_TIME_UNIT_FOREVER_ABS,
+ GNUNET_BLOCK_TYPE_ANY,
+ NULL, 0);
+ }
+ /* Finally, call our continuation to signal that we are
+ done with local processing of this request; i.e. to
+ start reading again from the client. */
+ cont (pr->llc_cont_cls, NULL, GNUNET_BLOCK_EVALUATION_OK_LAST);
+ return;
+ }
+
cont (pr->llc_cont_cls, pr, pr->local_result);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34496 - gnunet/src/fs,
gnunet <=