diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-08-19 10:55:36 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-08-19 10:55:36 +0200 |
commit | 5660868ce7523c4bda8e25954fda0ae2d28a9702 (patch) | |
tree | 0d90ade4c5d985cc921c998581710af541345a85 /src/seti | |
parent | 1eda2878cf1efef694c911c318427f14ecbdf8f3 (diff) | |
download | gnunet-5660868ce7523c4bda8e25954fda0ae2d28a9702.tar.gz gnunet-5660868ce7523c4bda8e25954fda0ae2d28a9702.zip |
fix seti testcase
Diffstat (limited to 'src/seti')
-rw-r--r-- | src/seti/gnunet-service-seti.c | 6 | ||||
-rw-r--r-- | src/seti/seti_api.c | 3 | ||||
-rw-r--r-- | src/seti/test_seti_api.c | 12 |
3 files changed, 16 insertions, 5 deletions
diff --git a/src/seti/gnunet-service-seti.c b/src/seti/gnunet-service-seti.c index 618d53128..af478233b 100644 --- a/src/seti/gnunet-service-seti.c +++ b/src/seti/gnunet-service-seti.c | |||
@@ -2200,6 +2200,9 @@ handle_client_evaluate (void *cls, | |||
2200 | UINT32_MAX); | 2200 | UINT32_MAX); |
2201 | op->peer = msg->target_peer; | 2201 | op->peer = msg->target_peer; |
2202 | op->return_intersection = htonl (msg->return_intersection); | 2202 | op->return_intersection = htonl (msg->return_intersection); |
2203 | fprintf (stderr, | ||
2204 | "Return intersection for evaluate is %d\n", | ||
2205 | op->return_intersection); | ||
2203 | op->client_request_id = ntohl (msg->request_id); | 2206 | op->client_request_id = ntohl (msg->request_id); |
2204 | context = GNUNET_MQ_extract_nested_mh (msg); | 2207 | context = GNUNET_MQ_extract_nested_mh (msg); |
2205 | 2208 | ||
@@ -2364,6 +2367,9 @@ handle_client_accept (void *cls, | |||
2364 | listener = op->listener; | 2367 | listener = op->listener; |
2365 | op->listener = NULL; | 2368 | op->listener = NULL; |
2366 | op->return_intersection = htonl (msg->return_intersection); | 2369 | op->return_intersection = htonl (msg->return_intersection); |
2370 | fprintf (stderr, | ||
2371 | "Return intersection for accept is %d\n", | ||
2372 | op->return_intersection); | ||
2367 | GNUNET_CONTAINER_DLL_remove (listener->op_head, | 2373 | GNUNET_CONTAINER_DLL_remove (listener->op_head, |
2368 | listener->op_tail, | 2374 | listener->op_tail, |
2369 | op); | 2375 | op); |
diff --git a/src/seti/seti_api.c b/src/seti/seti_api.c index 337b7b219..5b88b0469 100644 --- a/src/seti/seti_api.c +++ b/src/seti/seti_api.c | |||
@@ -806,7 +806,8 @@ GNUNET_SETI_accept (struct GNUNET_SETI_Request *request, | |||
806 | switch (opt->type) | 806 | switch (opt->type) |
807 | { | 807 | { |
808 | case GNUNET_SETI_OPTION_RETURN_INTERSECTION: | 808 | case GNUNET_SETI_OPTION_RETURN_INTERSECTION: |
809 | oh->return_intersection = htonl (GNUNET_YES); | 809 | oh->return_intersection = GNUNET_YES; |
810 | msg->return_intersection = htonl (GNUNET_YES); | ||
810 | break; | 811 | break; |
811 | default: | 812 | default: |
812 | LOG (GNUNET_ERROR_TYPE_ERROR, | 813 | LOG (GNUNET_ERROR_TYPE_ERROR, |
diff --git a/src/seti/test_seti_api.c b/src/seti/test_seti_api.c index 22a3a06e5..9074fab41 100644 --- a/src/seti/test_seti_api.c +++ b/src/seti/test_seti_api.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2012-2014 GNUnet e.V. | 3 | Copyright (C) 2012-2014, 2020 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software: you can redistribute it and/or modify it | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | under the terms of the GNU Affero General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
@@ -108,14 +108,18 @@ result_cb_set2 (void *cls, | |||
108 | break; | 108 | break; |
109 | case GNUNET_SETI_STATUS_DONE: | 109 | case GNUNET_SETI_STATUS_DONE: |
110 | oh2 = NULL; | 110 | oh2 = NULL; |
111 | GNUNET_assert (1 == count); | 111 | GNUNET_break (1 == count); |
112 | if (1 != count) | ||
113 | ret |= 2; | ||
112 | GNUNET_SETI_destroy (set2); | 114 | GNUNET_SETI_destroy (set2); |
113 | set2 = NULL; | 115 | set2 = NULL; |
114 | if (NULL == set1) | 116 | if (NULL == set1) |
115 | GNUNET_SCHEDULER_shutdown (); | 117 | GNUNET_SCHEDULER_shutdown (); |
116 | break; | 118 | break; |
117 | default: | 119 | case GNUNET_SETI_STATUS_DEL_LOCAL: |
118 | GNUNET_assert (0); | 120 | /* unexpected! */ |
121 | ret = 1; | ||
122 | break; | ||
119 | } | 123 | } |
120 | } | 124 | } |
121 | 125 | ||