aboutsummaryrefslogtreecommitdiff
path: root/src/scalarproduct
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-10-04 13:59:39 +0200
committerChristian Grothoff <christian@grothoff.org>2017-10-04 13:59:39 +0200
commit4fe6ffb8fbffbcc728118f20326fc699295aa1fc (patch)
tree5106981370961200a387c6dc5d95201832c32acf /src/scalarproduct
parenta995680a1408fc756a6ced539f4d3b46ed21b770 (diff)
downloadgnunet-4fe6ffb8fbffbcc728118f20326fc699295aa1fc.tar.gz
gnunet-4fe6ffb8fbffbcc728118f20326fc699295aa1fc.zip
delay cancelling listen operations to avoid rejecting operations before they had a chance to start, fixes misc. test case failures related to set
Diffstat (limited to 'src/scalarproduct')
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c8
-rw-r--r--src/scalarproduct/gnunet-service-scalarproduct_alice.c8
2 files changed, 1 insertions, 15 deletions
diff --git a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
index c0b33f8ef..57f275c81 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
@@ -260,8 +260,6 @@ 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");
265 GNUNET_SET_listen_cancel (s->intersection_listen); 263 GNUNET_SET_listen_cancel (s->intersection_listen);
266 s->intersection_listen = NULL; 264 s->intersection_listen = NULL;
267 } 265 }
@@ -274,8 +272,6 @@ destroy_service_session (struct AliceServiceSession *s)
274 } 272 }
275 if (NULL != s->intersection_set) 273 if (NULL != s->intersection_set)
276 { 274 {
277 LOG (GNUNET_ERROR_TYPE_DEBUG,
278 "Set intersection, set still there!\n");
279 GNUNET_SET_destroy (s->intersection_set); 275 GNUNET_SET_destroy (s->intersection_set);
280 s->intersection_set = NULL; 276 s->intersection_set = NULL;
281 } 277 }
@@ -809,10 +805,6 @@ cb_intersection_request_alice (void *cls,
809 prepare_client_end_notification (s); 805 prepare_client_end_notification (s);
810 return; 806 return;
811 } 807 }
812 GNUNET_SET_destroy (s->intersection_set);
813 s->intersection_set = NULL;
814 GNUNET_SET_listen_cancel (s->intersection_listen);
815 s->intersection_listen = NULL;
816} 808}
817 809
818 810
diff --git a/src/scalarproduct/gnunet-service-scalarproduct_alice.c b/src/scalarproduct/gnunet-service-scalarproduct_alice.c
index a55d03900..fcb1ce032 100644
--- a/src/scalarproduct/gnunet-service-scalarproduct_alice.c
+++ b/src/scalarproduct/gnunet-service-scalarproduct_alice.c
@@ -243,8 +243,6 @@ free_element_cb (void *cls,
243static void 243static void
244destroy_service_session (struct AliceServiceSession *s) 244destroy_service_session (struct AliceServiceSession *s)
245{ 245{
246 unsigned int i;
247
248 if (GNUNET_YES == s->in_destroy) 246 if (GNUNET_YES == s->in_destroy)
249 return; 247 return;
250 s->in_destroy = GNUNET_YES; 248 s->in_destroy = GNUNET_YES;
@@ -285,7 +283,7 @@ destroy_service_session (struct AliceServiceSession *s)
285 } 283 }
286 if (NULL != s->sorted_elements) 284 if (NULL != s->sorted_elements)
287 { 285 {
288 for (i=0;i<s->used_element_count;i++) 286 for (unsigned int i=0;i<s->used_element_count;i++)
289 gcry_mpi_release (s->sorted_elements[i].value); 287 gcry_mpi_release (s->sorted_elements[i].value);
290 GNUNET_free (s->sorted_elements); 288 GNUNET_free (s->sorted_elements);
291 s->sorted_elements = NULL; 289 s->sorted_elements = NULL;
@@ -1043,10 +1041,6 @@ cb_intersection_request_alice (void *cls,
1043 prepare_client_end_notification (s); 1041 prepare_client_end_notification (s);
1044 return; 1042 return;
1045 } 1043 }
1046 GNUNET_SET_destroy (s->intersection_set);
1047 s->intersection_set = NULL;
1048 GNUNET_SET_listen_cancel (s->intersection_listen);
1049 s->intersection_listen = NULL;
1050} 1044}
1051 1045
1052 1046