diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-19 18:48:02 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-19 18:48:02 +0100 |
commit | 8802f213c67692abebebdf9fe2d4a77afe2b1fcb (patch) | |
tree | 6ca39dbf3d851a88f2ed7f21faba3616c13b3796 /src | |
parent | 360d7afad50d1af425a20e89419d2063a6a0e220 (diff) | |
download | gnunet-8802f213c67692abebebdf9fe2d4a77afe2b1fcb.tar.gz gnunet-8802f213c67692abebebdf9fe2d4a77afe2b1fcb.zip |
misc logging, no semantic changes
Diffstat (limited to 'src')
-rw-r--r-- | src/cadet/gnunet-service-cadet-new_tunnels.c | 4 | ||||
-rw-r--r-- | src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c | 17 | ||||
-rw-r--r-- | src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c | 20 | ||||
-rw-r--r-- | src/set/set_api.c | 20 |
4 files changed, 54 insertions, 7 deletions
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, | |||
2576 | struct CadetPeerPath *p, | 2576 | struct CadetPeerPath *p, |
2577 | unsigned int off) | 2577 | unsigned int off) |
2578 | { | 2578 | { |
2579 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
2580 | "Considering %s for %s\n", | ||
2581 | GCPP_2s (p), | ||
2582 | GCT_2s (t)); | ||
2579 | (void) consider_path_cb (t, | 2583 | (void) consider_path_cb (t, |
2580 | p, | 2584 | p, |
2581 | off); | 2585 | 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) | |||
260 | } | 260 | } |
261 | if (NULL != s->intersection_listen) | 261 | if (NULL != s->intersection_listen) |
262 | { | 262 | { |
263 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
264 | "Set intersection, listen still up!\n"); | ||
263 | GNUNET_SET_listen_cancel (s->intersection_listen); | 265 | GNUNET_SET_listen_cancel (s->intersection_listen); |
264 | s->intersection_listen = NULL; | 266 | s->intersection_listen = NULL; |
265 | } | 267 | } |
266 | if (NULL != s->intersection_op) | 268 | if (NULL != s->intersection_op) |
267 | { | 269 | { |
270 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
271 | "Set intersection, op still ongoing!\n"); | ||
268 | GNUNET_SET_operation_cancel (s->intersection_op); | 272 | GNUNET_SET_operation_cancel (s->intersection_op); |
269 | s->intersection_op = NULL; | 273 | s->intersection_op = NULL; |
270 | } | 274 | } |
271 | if (NULL != s->intersection_set) | 275 | if (NULL != s->intersection_set) |
272 | { | 276 | { |
277 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
278 | "Set intersection, set still there!\n"); | ||
273 | GNUNET_SET_destroy (s->intersection_set); | 279 | GNUNET_SET_destroy (s->intersection_set); |
274 | s->intersection_set = NULL; | 280 | s->intersection_set = NULL; |
275 | } | 281 | } |
@@ -769,6 +775,9 @@ cb_intersection_request_alice (void *cls, | |||
769 | { | 775 | { |
770 | struct AliceServiceSession *s = cls; | 776 | struct AliceServiceSession *s = cls; |
771 | 777 | ||
778 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
779 | "Received intersection request from %s!\n", | ||
780 | GNUNET_i2s (other_peer)); | ||
772 | if (0 != memcmp (other_peer, | 781 | if (0 != memcmp (other_peer, |
773 | &s->peer, | 782 | &s->peer, |
774 | sizeof (struct GNUNET_PeerIdentity))) | 783 | sizeof (struct GNUNET_PeerIdentity))) |
@@ -947,8 +956,12 @@ handle_alice_client_message_multipart (void *cls, | |||
947 | if (s->total != s->client_received_element_count) | 956 | if (s->total != s->client_received_element_count) |
948 | { | 957 | { |
949 | /* more to come */ | 958 | /* more to come */ |
959 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
960 | "Received client multipart data, waiting for more!\n"); | ||
950 | return; | 961 | return; |
951 | } | 962 | } |
963 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
964 | "Launching computation\n"); | ||
952 | client_request_complete_alice (s); | 965 | client_request_complete_alice (s); |
953 | } | 966 | } |
954 | 967 | ||
@@ -1053,8 +1066,12 @@ handle_alice_client_message (void *cls, | |||
1053 | if (s->total != s->client_received_element_count) | 1066 | if (s->total != s->client_received_element_count) |
1054 | { | 1067 | { |
1055 | /* wait for multipart msg */ | 1068 | /* wait for multipart msg */ |
1069 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1070 | "Received partial client request, waiting for more!\n"); | ||
1056 | return; | 1071 | return; |
1057 | } | 1072 | } |
1073 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1074 | "Launching computation\n"); | ||
1058 | client_request_complete_alice (s); | 1075 | client_request_complete_alice (s); |
1059 | } | 1076 | } |
1060 | 1077 | ||
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, | |||
699 | struct BobServiceSession *s = cls; | 699 | struct BobServiceSession *s = cls; |
700 | 700 | ||
701 | s->session_id = msg->session_id; // ?? | 701 | s->session_id = msg->session_id; // ?? |
702 | if (s->client_received_element_count == s->total) | 702 | if (s->client_received_element_count < s->total) |
703 | start_intersection (s); | 703 | { |
704 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
705 | "Alice ready, still waiting for Bob client data!\n"); | ||
706 | return; | ||
707 | } | ||
708 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
709 | "Both ready, launching intersection!\n"); | ||
710 | start_intersection (s); | ||
704 | } | 711 | } |
705 | 712 | ||
706 | 713 | ||
@@ -811,13 +818,19 @@ handle_bob_client_message_multipart (void *cls, | |||
811 | if (s->total != s->client_received_element_count) | 818 | if (s->total != s->client_received_element_count) |
812 | { | 819 | { |
813 | /* more to come */ | 820 | /* more to come */ |
821 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
822 | "Request still partial, waiting for more client data!\n"); | ||
814 | return; | 823 | return; |
815 | } | 824 | } |
816 | if (NULL == s->channel) | 825 | if (NULL == s->channel) |
817 | { | 826 | { |
818 | /* no Alice waiting for this request, wait for Alice */ | 827 | /* no Alice waiting for this request, wait for Alice */ |
828 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
829 | "Client ready, still waiting for Alice!\n"); | ||
819 | return; | 830 | return; |
820 | } | 831 | } |
832 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
833 | "Both ready, launching intersection!\n"); | ||
821 | start_intersection (s); | 834 | start_intersection (s); |
822 | } | 835 | } |
823 | 836 | ||
@@ -931,6 +944,9 @@ handle_bob_client_message (void *cls, | |||
931 | s->used_element_count++; | 944 | s->used_element_count++; |
932 | } | 945 | } |
933 | GNUNET_SERVICE_client_continue (s->client); | 946 | GNUNET_SERVICE_client_continue (s->client); |
947 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
948 | "Received client request, opening port %s!\n", | ||
949 | GNUNET_h2s (&msg->session_key)); | ||
934 | s->port = GNUNET_CADET_open_porT (my_cadet, | 950 | s->port = GNUNET_CADET_open_porT (my_cadet, |
935 | &msg->session_key, | 951 | &msg->session_key, |
936 | &cb_channel_incoming, | 952 | &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, | |||
297 | * @param cls the `struct GNUNET_SET_Handle *` | 297 | * @param cls the `struct GNUNET_SET_Handle *` |
298 | * @param mh the message | 298 | * @param mh the message |
299 | */ | 299 | */ |
300 | static void | 300 | static void |
301 | handle_iter_element (void *cls, | 301 | handle_iter_element (void *cls, |
302 | const struct GNUNET_SET_IterResponseMessage *msg) | 302 | const struct GNUNET_SET_IterResponseMessage *msg) |
303 | { | 303 | { |
304 | struct GNUNET_SET_Handle *set = cls; | 304 | struct GNUNET_SET_Handle *set = cls; |
305 | GNUNET_SET_ElementIterator iter = set->iterator; | 305 | GNUNET_SET_ElementIterator iter = set->iterator; |
@@ -773,6 +773,9 @@ GNUNET_SET_prepare (const struct GNUNET_PeerIdentity *other_peer, | |||
773 | struct GNUNET_SET_OperationHandle *oh; | 773 | struct GNUNET_SET_OperationHandle *oh; |
774 | struct GNUNET_SET_EvaluateMessage *msg; | 774 | struct GNUNET_SET_EvaluateMessage *msg; |
775 | 775 | ||
776 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
777 | "Client prepares set operation (%d)\n", | ||
778 | result_mode); | ||
776 | oh = GNUNET_new (struct GNUNET_SET_OperationHandle); | 779 | oh = GNUNET_new (struct GNUNET_SET_OperationHandle); |
777 | oh->result_cb = result_cb; | 780 | oh->result_cb = result_cb; |
778 | oh->result_cls = result_cls; | 781 | oh->result_cls = result_cls; |
@@ -1011,6 +1014,9 @@ GNUNET_SET_accept (struct GNUNET_SET_Request *request, | |||
1011 | struct GNUNET_SET_AcceptMessage *msg; | 1014 | struct GNUNET_SET_AcceptMessage *msg; |
1012 | 1015 | ||
1013 | GNUNET_assert (GNUNET_NO == request->accepted); | 1016 | GNUNET_assert (GNUNET_NO == request->accepted); |
1017 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
1018 | "Client accepts set operation (%d)\n", | ||
1019 | result_mode); | ||
1014 | request->accepted = GNUNET_YES; | 1020 | request->accepted = GNUNET_YES; |
1015 | mqm = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SET_ACCEPT); | 1021 | mqm = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_SET_ACCEPT); |
1016 | msg->accept_reject_id = htonl (request->accept_id); | 1022 | msg->accept_reject_id = htonl (request->accept_id); |
@@ -1050,14 +1056,18 @@ GNUNET_SET_commit (struct GNUNET_SET_OperationHandle *oh, | |||
1050 | } | 1056 | } |
1051 | if (GNUNET_YES == set->invalid) | 1057 | if (GNUNET_YES == set->invalid) |
1052 | return GNUNET_SYSERR; | 1058 | return GNUNET_SYSERR; |
1059 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
1060 | "Client commits to SET\n"); | ||
1053 | GNUNET_assert (NULL != oh->conclude_mqm); | 1061 | GNUNET_assert (NULL != oh->conclude_mqm); |
1054 | oh->set = set; | 1062 | oh->set = set; |
1055 | GNUNET_CONTAINER_DLL_insert (set->ops_head, | 1063 | GNUNET_CONTAINER_DLL_insert (set->ops_head, |
1056 | set->ops_tail, | 1064 | set->ops_tail, |
1057 | oh); | 1065 | oh); |
1058 | oh->request_id = GNUNET_MQ_assoc_add (set->mq, oh); | 1066 | oh->request_id = GNUNET_MQ_assoc_add (set->mq, |
1067 | oh); | ||
1059 | *oh->request_id_addr = htonl (oh->request_id); | 1068 | *oh->request_id_addr = htonl (oh->request_id); |
1060 | GNUNET_MQ_send (set->mq, oh->conclude_mqm); | 1069 | GNUNET_MQ_send (set->mq, |
1070 | oh->conclude_mqm); | ||
1061 | oh->conclude_mqm = NULL; | 1071 | oh->conclude_mqm = NULL; |
1062 | oh->request_id_addr = NULL; | 1072 | oh->request_id_addr = NULL; |
1063 | return GNUNET_OK; | 1073 | return GNUNET_OK; |