summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-08-19 10:55:36 +0200
committerChristian Grothoff <christian@grothoff.org>2020-08-19 10:55:36 +0200
commit5660868ce7523c4bda8e25954fda0ae2d28a9702 (patch)
tree0d90ade4c5d985cc921c998581710af541345a85
parent1eda2878cf1efef694c911c318427f14ecbdf8f3 (diff)
fix seti testcase
-rw-r--r--src/seti/gnunet-service-seti.c6
-rw-r--r--src/seti/seti_api.c3
-rw-r--r--src/seti/test_seti_api.c12
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,
UINT32_MAX);
op->peer = msg->target_peer;
op->return_intersection = htonl (msg->return_intersection);
+ fprintf (stderr,
+ "Return intersection for evaluate is %d\n",
+ op->return_intersection);
op->client_request_id = ntohl (msg->request_id);
context = GNUNET_MQ_extract_nested_mh (msg);
@@ -2364,6 +2367,9 @@ handle_client_accept (void *cls,
listener = op->listener;
op->listener = NULL;
op->return_intersection = htonl (msg->return_intersection);
+ fprintf (stderr,
+ "Return intersection for accept is %d\n",
+ op->return_intersection);
GNUNET_CONTAINER_DLL_remove (listener->op_head,
listener->op_tail,
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,
switch (opt->type)
{
case GNUNET_SETI_OPTION_RETURN_INTERSECTION:
- oh->return_intersection = htonl (GNUNET_YES);
+ oh->return_intersection = GNUNET_YES;
+ msg->return_intersection = htonl (GNUNET_YES);
break;
default:
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 @@
/*
This file is part of GNUnet.
- Copyright (C) 2012-2014 GNUnet e.V.
+ Copyright (C) 2012-2014, 2020 GNUnet e.V.
GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
@@ -108,14 +108,18 @@ result_cb_set2 (void *cls,
break;
case GNUNET_SETI_STATUS_DONE:
oh2 = NULL;
- GNUNET_assert (1 == count);
+ GNUNET_break (1 == count);
+ if (1 != count)
+ ret |= 2;
GNUNET_SETI_destroy (set2);
set2 = NULL;
if (NULL == set1)
GNUNET_SCHEDULER_shutdown ();
break;
- default:
- GNUNET_assert (0);
+ case GNUNET_SETI_STATUS_DEL_LOCAL:
+ /* unexpected! */
+ ret = 1;
+ break;
}
}