From 8ad5ede4c2d3dc970a3c721887f2b0cc38a31931 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 17 Feb 2017 15:16:44 +0100 Subject: [PATCH] fix crash issues in SET --- src/set/gnunet-service-set.c | 20 -------------------- src/set/set.conf.in | 2 +- src/set/set_api.c | 10 ++-------- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c index 7ebb30b01..5633561ac 100644 --- a/src/set/gnunet-service-set.c +++ b/src/set/gnunet-service-set.c @@ -229,11 +229,6 @@ listener_destroy (struct Listener *listener) GNUNET_SERVICE_client_drop (client); return; } - if (NULL != listener->client_mq) - { - GNUNET_MQ_destroy (listener->client_mq); - listener->client_mq = NULL; - } GNUNET_CADET_close_port (listener->open_port); GNUNET_CONTAINER_DLL_remove (listeners_head, listeners_tail, @@ -473,11 +468,6 @@ _GSS_operation_destroy (struct Operation *op, GNUNET_free (op->spec); op->spec = NULL; } - if (NULL != op->mq) - { - GNUNET_MQ_destroy (op->mq); - op->mq = NULL; - } if (NULL != (channel = op->channel)) { op->channel = NULL; @@ -537,11 +527,6 @@ set_destroy (struct Set *set) _GSS_operation_destroy (set->ops_head, GNUNET_NO); set->vt->destroy_set (set->state); set->state = NULL; - if (NULL != set->client_mq) - { - GNUNET_MQ_destroy (set->client_mq); - set->client_mq = NULL; - } if (NULL != set->iter) { GNUNET_CONTAINER_multihashmap_iterator_destroy (set->iter); @@ -687,11 +672,6 @@ incoming_destroy (struct Operation *incoming) GNUNET_free (incoming->spec); incoming->spec = NULL; } - if (NULL != incoming->mq) - { - GNUNET_MQ_destroy (incoming->mq); - incoming->mq = NULL; - } if (NULL != (channel = incoming->channel)) { incoming->channel = NULL; diff --git a/src/set/set.conf.in b/src/set/set.conf.in index 707bc3575..462ce70ed 100644 --- a/src/set/set.conf.in +++ b/src/set/set.conf.in @@ -9,4 +9,4 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-set.sock UNIX_MATCH_UID = YES UNIX_MATCH_GID = YES -# PREFIX = valgrind +PREFIX = valgrind diff --git a/src/set/set_api.c b/src/set/set_api.c index 7a7267a33..90dd708df 100644 --- a/src/set/set_api.c +++ b/src/set/set_api.c @@ -530,7 +530,7 @@ handle_client_set_error (void *cls, struct GNUNET_SET_Handle *set = cls; GNUNET_SET_ElementIterator iter = set->iterator; - LOG (GNUNET_ERROR_TYPE_DEBUG, + LOG (GNUNET_ERROR_TYPE_ERROR, "Handling client set error %d\n", error); while (NULL != set->ops_head) @@ -543,16 +543,10 @@ handle_client_set_error (void *cls, } set->iterator = NULL; set->iteration_id++; + set->invalid = GNUNET_YES; if (NULL != iter) iter (set->iterator_cls, NULL); - set->invalid = GNUNET_YES; - if (GNUNET_YES == set->destroy_requested) - { - LOG (GNUNET_ERROR_TYPE_DEBUG, - "Destroying set after operation failure\n"); - GNUNET_SET_destroy (set); - } } -- 2.25.1