From: Christian Grothoff Date: Sun, 19 Feb 2017 17:48:02 +0000 (+0100) Subject: misc logging, no semantic changes X-Git-Tag: taler-0.2.1~135 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8802f213c67692abebebdf9fe2d4a77afe2b1fcb;p=oweals%2Fgnunet.git misc logging, no semantic changes --- diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c b/src/cadet/gnunet-service-cadet-new_tunnels.c index 26983d465..f4772a16c 100644 --- a/src/cadet/gnunet-service-cadet-new_tunnels.c +++ b/src/cadet/gnunet-service-cadet-new_tunnels.c @@ -2576,6 +2576,10 @@ GCT_consider_path (struct CadetTunnel *t, 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); diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c index 79a6c6704..9f8d98657 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c +++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c @@ -260,16 +260,22 @@ destroy_service_session (struct AliceServiceSession *s) } 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; } @@ -769,6 +775,9 @@ cb_intersection_request_alice (void *cls, { 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))) @@ -947,8 +956,12 @@ handle_alice_client_message_multipart (void *cls, 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); } @@ -1053,8 +1066,12 @@ handle_alice_client_message (void *cls, 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); } diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c index 26468f9e7..7fd69a4ea 100644 --- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c +++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c @@ -699,8 +699,15 @@ handle_alices_computation_request (void *cls, 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); } @@ -811,13 +818,19 @@ handle_bob_client_message_multipart (void *cls, 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); } @@ -931,6 +944,9 @@ handle_bob_client_message (void *cls, 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, diff --git a/src/set/set_api.c b/src/set/set_api.c index 769be82d2..baeee6da0 100644 --- a/src/set/set_api.c +++ b/src/set/set_api.c @@ -297,9 +297,9 @@ check_iter_element (void *cls, * @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; @@ -773,6 +773,9 @@ GNUNET_SET_prepare (const struct GNUNET_PeerIdentity *other_peer, 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; @@ -1011,6 +1014,9 @@ GNUNET_SET_accept (struct GNUNET_SET_Request *request, 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); @@ -1050,14 +1056,18 @@ GNUNET_SET_commit (struct GNUNET_SET_OperationHandle *oh, } 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;