fix crash issues in SET
authorChristian Grothoff <christian@grothoff.org>
Fri, 17 Feb 2017 14:16:44 +0000 (15:16 +0100)
committerChristian Grothoff <christian@grothoff.org>
Fri, 17 Feb 2017 14:16:44 +0000 (15:16 +0100)
src/set/gnunet-service-set.c
src/set/set.conf.in
src/set/set_api.c

index 7ebb30b01f6cf9754fd2075da9fa667ce2147402..5633561ac4a9f45ff34250ffc20ebdff72be1caf 100644 (file)
@@ -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;
index 707bc3575a53d9c8e47154fa0e336bba81d00339..462ce70ed76344ada125017fb50f1a6127186eb3 100644 (file)
@@ -9,4 +9,4 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-set.sock
 UNIX_MATCH_UID = YES
 UNIX_MATCH_GID = YES
 
-PREFIX = valgrind
+PREFIX = valgrind
index 7a7267a330c43075438d9599416bb17ff03058ff..90dd708df043febfc939be52563bee1c0b9fcc22 100644 (file)
@@ -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);
-  }
 }