aboutsummaryrefslogtreecommitdiff
path: root/src/set
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-17 15:16:44 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-17 15:16:44 +0100
commit8ad5ede4c2d3dc970a3c721887f2b0cc38a31931 (patch)
tree37c9eb9a603ec7ead0d9f866b0ee0bbc2034d1c7 /src/set
parentdf55d08fd1316908c1e5ec65ca8b8947ca46d007 (diff)
downloadgnunet-8ad5ede4c2d3dc970a3c721887f2b0cc38a31931.tar.gz
gnunet-8ad5ede4c2d3dc970a3c721887f2b0cc38a31931.zip
fix crash issues in SET
Diffstat (limited to 'src/set')
-rw-r--r--src/set/gnunet-service-set.c20
-rw-r--r--src/set/set.conf.in2
-rw-r--r--src/set/set_api.c10
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)
229 GNUNET_SERVICE_client_drop (client); 229 GNUNET_SERVICE_client_drop (client);
230 return; 230 return;
231 } 231 }
232 if (NULL != listener->client_mq)
233 {
234 GNUNET_MQ_destroy (listener->client_mq);
235 listener->client_mq = NULL;
236 }
237 GNUNET_CADET_close_port (listener->open_port); 232 GNUNET_CADET_close_port (listener->open_port);
238 GNUNET_CONTAINER_DLL_remove (listeners_head, 233 GNUNET_CONTAINER_DLL_remove (listeners_head,
239 listeners_tail, 234 listeners_tail,
@@ -473,11 +468,6 @@ _GSS_operation_destroy (struct Operation *op,
473 GNUNET_free (op->spec); 468 GNUNET_free (op->spec);
474 op->spec = NULL; 469 op->spec = NULL;
475 } 470 }
476 if (NULL != op->mq)
477 {
478 GNUNET_MQ_destroy (op->mq);
479 op->mq = NULL;
480 }
481 if (NULL != (channel = op->channel)) 471 if (NULL != (channel = op->channel))
482 { 472 {
483 op->channel = NULL; 473 op->channel = NULL;
@@ -537,11 +527,6 @@ set_destroy (struct Set *set)
537 _GSS_operation_destroy (set->ops_head, GNUNET_NO); 527 _GSS_operation_destroy (set->ops_head, GNUNET_NO);
538 set->vt->destroy_set (set->state); 528 set->vt->destroy_set (set->state);
539 set->state = NULL; 529 set->state = NULL;
540 if (NULL != set->client_mq)
541 {
542 GNUNET_MQ_destroy (set->client_mq);
543 set->client_mq = NULL;
544 }
545 if (NULL != set->iter) 530 if (NULL != set->iter)
546 { 531 {
547 GNUNET_CONTAINER_multihashmap_iterator_destroy (set->iter); 532 GNUNET_CONTAINER_multihashmap_iterator_destroy (set->iter);
@@ -687,11 +672,6 @@ incoming_destroy (struct Operation *incoming)
687 GNUNET_free (incoming->spec); 672 GNUNET_free (incoming->spec);
688 incoming->spec = NULL; 673 incoming->spec = NULL;
689 } 674 }
690 if (NULL != incoming->mq)
691 {
692 GNUNET_MQ_destroy (incoming->mq);
693 incoming->mq = NULL;
694 }
695 if (NULL != (channel = incoming->channel)) 675 if (NULL != (channel = incoming->channel))
696 { 676 {
697 incoming->channel = NULL; 677 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
9UNIX_MATCH_UID = YES 9UNIX_MATCH_UID = YES
10UNIX_MATCH_GID = YES 10UNIX_MATCH_GID = YES
11 11
12# PREFIX = valgrind 12PREFIX = 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,
530 struct GNUNET_SET_Handle *set = cls; 530 struct GNUNET_SET_Handle *set = cls;
531 GNUNET_SET_ElementIterator iter = set->iterator; 531 GNUNET_SET_ElementIterator iter = set->iterator;
532 532
533 LOG (GNUNET_ERROR_TYPE_DEBUG, 533 LOG (GNUNET_ERROR_TYPE_ERROR,
534 "Handling client set error %d\n", 534 "Handling client set error %d\n",
535 error); 535 error);
536 while (NULL != set->ops_head) 536 while (NULL != set->ops_head)
@@ -543,16 +543,10 @@ handle_client_set_error (void *cls,
543 } 543 }
544 set->iterator = NULL; 544 set->iterator = NULL;
545 set->iteration_id++; 545 set->iteration_id++;
546 set->invalid = GNUNET_YES;
546 if (NULL != iter) 547 if (NULL != iter)
547 iter (set->iterator_cls, 548 iter (set->iterator_cls,
548 NULL); 549 NULL);
549 set->invalid = GNUNET_YES;
550 if (GNUNET_YES == set->destroy_requested)
551 {
552 LOG (GNUNET_ERROR_TYPE_DEBUG,
553 "Destroying set after operation failure\n");
554 GNUNET_SET_destroy (set);
555 }
556} 550}
557 551
558 552