From 4fe6ffb8fbffbcc728118f20326fc699295aa1fc Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 4 Oct 2017 13:59:39 +0200 Subject: delay cancelling listen operations to avoid rejecting operations before they had a chance to start, fixes misc. test case failures related to set --- src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c | 8 -------- src/scalarproduct/gnunet-service-scalarproduct_alice.c | 8 +------- 2 files changed, 1 insertion(+), 15 deletions(-) (limited to 'src/scalarproduct') 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) } 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; } @@ -274,8 +272,6 @@ destroy_service_session (struct AliceServiceSession *s) } 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; } @@ -809,10 +805,6 @@ cb_intersection_request_alice (void *cls, prepare_client_end_notification (s); return; } - GNUNET_SET_destroy (s->intersection_set); - s->intersection_set = NULL; - GNUNET_SET_listen_cancel (s->intersection_listen); - s->intersection_listen = NULL; } 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, static void destroy_service_session (struct AliceServiceSession *s) { - unsigned int i; - if (GNUNET_YES == s->in_destroy) return; s->in_destroy = GNUNET_YES; @@ -285,7 +283,7 @@ destroy_service_session (struct AliceServiceSession *s) } if (NULL != s->sorted_elements) { - for (i=0;iused_element_count;i++) + for (unsigned int i=0;iused_element_count;i++) gcry_mpi_release (s->sorted_elements[i].value); GNUNET_free (s->sorted_elements); s->sorted_elements = NULL; @@ -1043,10 +1041,6 @@ cb_intersection_request_alice (void *cls, prepare_client_end_notification (s); return; } - GNUNET_SET_destroy (s->intersection_set); - s->intersection_set = NULL; - GNUNET_SET_listen_cancel (s->intersection_listen); - s->intersection_listen = NULL; } -- cgit v1.2.3