aboutsummaryrefslogtreecommitdiff
path: root/src/scalarproduct
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-19 18:48:02 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-19 18:48:02 +0100
commit8802f213c67692abebebdf9fe2d4a77afe2b1fcb (patch)
tree6ca39dbf3d851a88f2ed7f21faba3616c13b3796 /src/scalarproduct
parent360d7afad50d1af425a20e89419d2063a6a0e220 (diff)
downloadgnunet-8802f213c67692abebebdf9fe2d4a77afe2b1fcb.tar.gz
gnunet-8802f213c67692abebebdf9fe2d4a77afe2b1fcb.zip
misc logging, no semantic changes
Diffstat (limited to 'src/scalarproduct')
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c17
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c20
2 files changed, 35 insertions, 2 deletions
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,