* @param cfg configuration to use
*/
static void
-run (void *cls, struct GNUNET_SERVER_Handle *server,
+run (void *cls,
+ struct GNUNET_SERVER_Handle *server,
const struct GNUNET_CONFIGURATION_Handle *cfg)
{
static const struct GNUNET_SERVER_MessageHandler server_handlers[] = {
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending done and destroy because iterator ran out\n");
+ op->keep = GNUNET_NO;
send_client_done_and_destroy (op);
return;
}
ee = nxt;
element = &ee->element;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Sending element (size %u) to client (full set)\n",
+ "Sending element %s:%u to client (full set)\n",
+ GNUNET_h2s (&ee->element_hash),
element->size);
GNUNET_assert (0 != op->spec->client_request_id);
ev = GNUNET_MQ_msg_extra (rm,
if (GNUNET_SET_RESULT_FULL == op->spec->result_mode)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Sending full result set\n");
+ "Sending full result set (%u elements)\n",
+ GNUNET_CONTAINER_multihashmap_size (op->state->my_elements));
op->state->full_result_iter
= GNUNET_CONTAINER_multihashmap_iterator_create (op->state->my_elements);
+ op->keep = GNUNET_YES;
send_remaining_elements (op);
return;
}
return;
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Got final DONE\n");
+ "Got IntersectionDoneMessage, have %u elements in intersection\n",
+ op->state->my_element_count);
op->state->phase = PHASE_FINISHED;
finish_and_destroy (op);
}
msg = (const struct GNUNET_SET_ResultMessage *) mh;
GNUNET_assert (NULL != set->mq);
result_status = ntohs (msg->result_status);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Got result message with status %d\n",
+ result_status);
+
oh = GNUNET_MQ_assoc_get (set->mq,
ntohl (msg->request_id));
if (NULL == oh)
oh->result_cb (oh->result_cls,
NULL,
result_status);
+ switch (result_status)
+ {
+ case GNUNET_SET_STATUS_OK:
+ break;
+ case GNUNET_SET_STATUS_FAILURE:
+ oh->result_cb = NULL;
+ break;
+ case GNUNET_SET_STATUS_HALF_DONE:
+ break;
+ case GNUNET_SET_STATUS_DONE:
+ oh->result_cb = NULL;
+ break;
+ }
GNUNET_free (oh);
return;
}
struct GNUNET_SET_Handle *set = cls;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Handling client set error\n");
+ "Handling client set error %d\n",
+ error);
while (NULL != set->ops_head)
{
if (NULL != set->ops_head->result_cb)
}
set->mq = GNUNET_MQ_queue_for_connection_client (set->client,
mq_handlers,
- &handle_client_set_error, set);
+ &handle_client_set_error,
+ set);
GNUNET_assert (NULL != set->mq);
mqm = GNUNET_MQ_msg (msg,
GNUNET_MESSAGE_TYPE_SET_CREATE);
enum GNUNET_SET_Status status)
{
static int count;
+
switch (status)
{
case GNUNET_SET_STATUS_OK: