struct CadetPeerPath *p,
unsigned int off)
{
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Considering %s for %s\n",
+ GCPP_2s (p),
+ GCT_2s (t));
(void) consider_path_cb (t,
p,
off);
}
if (NULL != s->intersection_listen)
{
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Set intersection, listen still up!\n");
GNUNET_SET_listen_cancel (s->intersection_listen);
s->intersection_listen = NULL;
}
if (NULL != s->intersection_op)
{
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Set intersection, op still ongoing!\n");
GNUNET_SET_operation_cancel (s->intersection_op);
s->intersection_op = NULL;
}
if (NULL != s->intersection_set)
{
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Set intersection, set still there!\n");
GNUNET_SET_destroy (s->intersection_set);
s->intersection_set = NULL;
}
{
struct AliceServiceSession *s = cls;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Received intersection request from %s!\n",
+ GNUNET_i2s (other_peer));
if (0 != memcmp (other_peer,
&s->peer,
sizeof (struct GNUNET_PeerIdentity)))
if (s->total != s->client_received_element_count)
{
/* more to come */
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Received client multipart data, waiting for more!\n");
return;
}
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Launching computation\n");
client_request_complete_alice (s);
}
if (s->total != s->client_received_element_count)
{
/* wait for multipart msg */
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Received partial client request, waiting for more!\n");
return;
}
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Launching computation\n");
client_request_complete_alice (s);
}
struct BobServiceSession *s = cls;
s->session_id = msg->session_id; // ??
- if (s->client_received_element_count == s->total)
- start_intersection (s);
+ if (s->client_received_element_count < s->total)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Alice ready, still waiting for Bob client data!\n");
+ return;
+ }
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Both ready, launching intersection!\n");
+ start_intersection (s);
}
if (s->total != s->client_received_element_count)
{
/* more to come */
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Request still partial, waiting for more client data!\n");
return;
}
if (NULL == s->channel)
{
/* no Alice waiting for this request, wait for Alice */
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Client ready, still waiting for Alice!\n");
return;
}
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Both ready, launching intersection!\n");
start_intersection (s);
}
s->used_element_count++;
}
GNUNET_SERVICE_client_continue (s->client);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Received client request, opening port %s!\n",
+ GNUNET_h2s (&msg->session_key));
s->port = GNUNET_CADET_open_porT (my_cadet,
&msg->session_key,
&cb_channel_incoming,
* @param cls the `struct GNUNET_SET_Handle *`
* @param mh the message
*/
- static void
- handle_iter_element (void *cls,
- const struct GNUNET_SET_IterResponseMessage *msg)
+static void
+handle_iter_element (void *cls,
+ const struct GNUNET_SET_IterResponseMessage *msg)
{
struct GNUNET_SET_Handle *set = cls;
GNUNET_SET_ElementIterator iter = set->iterator;
struct GNUNET_SET_OperationHandle *oh;
struct GNUNET_SET_EvaluateMessage *msg;
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Client prepares set operation (%d)\n",
+ result_mode);
oh = GNUNET_new (struct GNUNET_SET_OperationHandle);
oh->result_cb = result_cb;
oh->result_cls = result_cls;
struct GNUNET_SET_AcceptMessage *msg;
GNUNET_assert (GNUNET_NO == request->accepted);
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Client accepts set operation (%d)\n",
+ result_mode);
request->accepted = GNUNET_YES;
mqm = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SET_ACCEPT);
msg->accept_reject_id = htonl (request->accept_id);
}
if (GNUNET_YES == set->invalid)
return GNUNET_SYSERR;
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Client commits to SET\n");
GNUNET_assert (NULL != oh->conclude_mqm);
oh->set = set;
GNUNET_CONTAINER_DLL_insert (set->ops_head,
set->ops_tail,
oh);
- oh->request_id = GNUNET_MQ_assoc_add (set->mq, oh);
+ oh->request_id = GNUNET_MQ_assoc_add (set->mq,
+ oh);
*oh->request_id_addr = htonl (oh->request_id);
- GNUNET_MQ_send (set->mq, oh->conclude_mqm);
+ GNUNET_MQ_send (set->mq,
+ oh->conclude_mqm);
oh->conclude_mqm = NULL;
oh->request_id_addr = NULL;
return GNUNET_OK;