pm->expiration = GNUNET_TIME_absolute_hton (expiration);
memcpy (&pm[1], data, data_len);
GSF_local_client_transmit_ (lc, &pm->header);
-
+#if DEBUG_FS
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Queued reply to query `%s' for local client\n",
+ GNUNET_h2s (&prd->query),
+ (unsigned int) prd->type);
+#endif
if (GNUNET_NO == more)
{
GNUNET_CONTAINER_DLL_remove (lc->cr_head,
lc->cr_tail,
cr);
+ GNUNET_SERVER_receive_done (lc->client,
+ GNUNET_OK);
+ GNUNET_STATISTICS_update (GSF_stats,
+ gettext_noop ("# client searches active"),
+ - 1,
+ GNUNET_NO);
GNUNET_free (cr);
}
}
pos->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);
}
while (NULL != (res = pos->res_head))
struct GNUNET_SERVER_Client *client = cls;
struct GSF_PendingRequestData *prd;
+ prd = GSF_pending_request_get_data_ (pr);
+#if DEBUG_FS
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Finished database lookup for local request `%s' with result %d\n",
+ GNUNET_h2s (&prd->query),
+ result);
+#endif
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);
if (0 != (GSF_PRO_LOCAL_ONLY & prd->options) )
{
GSF_pending_request_cancel_ (pr);
GSF_update_datastore_delay_ (pr->public_data.start_time);
process_reply (&prq, key, pr);
if (prq.finished == GNUNET_YES)
- return;
+ {
+#if DEBUG_FS
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Request processing finished, not asking datastore for more\n");
+#endif
+ return;
+ }
pr->local_result = prq.eval;
if (pr->qe == NULL)
- return; /* done here */
+ {
+#if DEBUG_FS
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Request cancelled, not asking datastore for more\n");
+#endif
+ }
if (prq.eval == GNUNET_BLOCK_EVALUATION_OK_LAST)
{
GNUNET_DATASTORE_get_next (GSF_dsh, GNUNET_NO);