summaryrefslogtreecommitdiff
path: root/src/set
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/set
parenta995680a1408fc756a6ced539f4d3b46ed21b770 (diff)
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/set')
-rw-r--r--src/set/gnunet-service-set.c6
-rw-r--r--src/set/test_set_intersection_result_full.c2
-rw-r--r--src/set/test_set_union_result_symmetric.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index 617a33661..42d06b275 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -628,7 +628,13 @@ client_disconnect_cb (void *cls,
GNUNET_CADET_close_port (listener->open_port);
listener->open_port = NULL;
while (NULL != (op = listener->op_head))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Destroying incoming operation `%u' from peer `%s'\n",
+ (unsigned int) op->client_request_id,
+ GNUNET_i2s (&op->peer));
incoming_destroy (op);
+ }
GNUNET_CONTAINER_DLL_remove (listener_head,
listener_tail,
listener);
diff --git a/src/set/test_set_intersection_result_full.c b/src/set/test_set_intersection_result_full.c
index a36aae4d5..16de983cf 100644
--- a/src/set/test_set_intersection_result_full.c
+++ b/src/set/test_set_intersection_result_full.c
@@ -131,8 +131,6 @@ listen_cb (void *cls,
"starting intersection by accepting and committing\n");
GNUNET_assert (NULL != context_msg);
GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY);
- GNUNET_SET_listen_cancel (listen_handle);
- listen_handle = NULL;
oh2 = GNUNET_SET_accept (request,
GNUNET_SET_RESULT_FULL,
(struct GNUNET_SET_Option[]) { 0 },
diff --git a/src/set/test_set_union_result_symmetric.c b/src/set/test_set_union_result_symmetric.c
index f81c7b8f7..3008e5aac 100644
--- a/src/set/test_set_union_result_symmetric.c
+++ b/src/set/test_set_union_result_symmetric.c
@@ -182,8 +182,6 @@ listen_cb (void *cls,
GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"listen cb called\n");
- GNUNET_SET_listen_cancel (listen_handle);
- listen_handle = NULL;
oh2 = GNUNET_SET_accept (request,
GNUNET_SET_RESULT_SYMMETRIC,
(struct GNUNET_SET_Option[]) { 0 },