diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-10-04 13:59:39 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-10-04 13:59:39 +0200 |
commit | 4fe6ffb8fbffbcc728118f20326fc699295aa1fc (patch) | |
tree | 5106981370961200a387c6dc5d95201832c32acf /src/set | |
parent | a995680a1408fc756a6ced539f4d3b46ed21b770 (diff) | |
download | gnunet-4fe6ffb8fbffbcc728118f20326fc699295aa1fc.tar.gz gnunet-4fe6ffb8fbffbcc728118f20326fc699295aa1fc.zip |
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.c | 6 | ||||
-rw-r--r-- | src/set/test_set_intersection_result_full.c | 2 | ||||
-rw-r--r-- | src/set/test_set_union_result_symmetric.c | 2 |
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, | |||
628 | GNUNET_CADET_close_port (listener->open_port); | 628 | GNUNET_CADET_close_port (listener->open_port); |
629 | listener->open_port = NULL; | 629 | listener->open_port = NULL; |
630 | while (NULL != (op = listener->op_head)) | 630 | while (NULL != (op = listener->op_head)) |
631 | { | ||
632 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
633 | "Destroying incoming operation `%u' from peer `%s'\n", | ||
634 | (unsigned int) op->client_request_id, | ||
635 | GNUNET_i2s (&op->peer)); | ||
631 | incoming_destroy (op); | 636 | incoming_destroy (op); |
637 | } | ||
632 | GNUNET_CONTAINER_DLL_remove (listener_head, | 638 | GNUNET_CONTAINER_DLL_remove (listener_head, |
633 | listener_tail, | 639 | listener_tail, |
634 | listener); | 640 | 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, | |||
131 | "starting intersection by accepting and committing\n"); | 131 | "starting intersection by accepting and committing\n"); |
132 | GNUNET_assert (NULL != context_msg); | 132 | GNUNET_assert (NULL != context_msg); |
133 | GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY); | 133 | GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY); |
134 | GNUNET_SET_listen_cancel (listen_handle); | ||
135 | listen_handle = NULL; | ||
136 | oh2 = GNUNET_SET_accept (request, | 134 | oh2 = GNUNET_SET_accept (request, |
137 | GNUNET_SET_RESULT_FULL, | 135 | GNUNET_SET_RESULT_FULL, |
138 | (struct GNUNET_SET_Option[]) { 0 }, | 136 | (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, | |||
182 | GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY); | 182 | GNUNET_assert (ntohs (context_msg->type) == GNUNET_MESSAGE_TYPE_DUMMY); |
183 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 183 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
184 | "listen cb called\n"); | 184 | "listen cb called\n"); |
185 | GNUNET_SET_listen_cancel (listen_handle); | ||
186 | listen_handle = NULL; | ||
187 | oh2 = GNUNET_SET_accept (request, | 185 | oh2 = GNUNET_SET_accept (request, |
188 | GNUNET_SET_RESULT_SYMMETRIC, | 186 | GNUNET_SET_RESULT_SYMMETRIC, |
189 | (struct GNUNET_SET_Option[]) { 0 }, | 187 | (struct GNUNET_SET_Option[]) { 0 }, |