diff options
Diffstat (limited to 'src/seti/gnunet-service-seti.c')
-rw-r--r-- | src/seti/gnunet-service-seti.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/seti/gnunet-service-seti.c b/src/seti/gnunet-service-seti.c index 7159a7ba2..618d53128 100644 --- a/src/seti/gnunet-service-seti.c +++ b/src/seti/gnunet-service-seti.c | |||
@@ -519,8 +519,11 @@ send_client_removed_element (struct Operation *op, | |||
519 | struct GNUNET_MQ_Envelope *ev; | 519 | struct GNUNET_MQ_Envelope *ev; |
520 | struct GNUNET_SETI_ResultMessage *rm; | 520 | struct GNUNET_SETI_ResultMessage *rm; |
521 | 521 | ||
522 | if (GNUNET_NO != op->return_intersection) | 522 | if (GNUNET_YES == op->return_intersection) |
523 | { | ||
524 | GNUNET_break (0); | ||
523 | return; /* Wrong mode for transmitting removed elements */ | 525 | return; /* Wrong mode for transmitting removed elements */ |
526 | } | ||
524 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 527 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
525 | "Sending removed element (size %u) to client\n", | 528 | "Sending removed element (size %u) to client\n", |
526 | element->size); | 529 | element->size); |
@@ -1096,6 +1099,11 @@ send_remaining_elements (void *cls) | |||
1096 | const struct GNUNET_SETI_Element *element; | 1099 | const struct GNUNET_SETI_Element *element; |
1097 | int res; | 1100 | int res; |
1098 | 1101 | ||
1102 | if (GNUNET_NO == op->return_intersection) | ||
1103 | { | ||
1104 | GNUNET_break (0); | ||
1105 | return; /* Wrong mode for transmitting removed elements */ | ||
1106 | } | ||
1099 | res = GNUNET_CONTAINER_multihashmap_iterator_next ( | 1107 | res = GNUNET_CONTAINER_multihashmap_iterator_next ( |
1100 | op->full_result_iter, | 1108 | op->full_result_iter, |
1101 | NULL, | 1109 | NULL, |
@@ -2191,6 +2199,7 @@ handle_client_evaluate (void *cls, | |||
2191 | op->salt = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, | 2199 | op->salt = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, |
2192 | UINT32_MAX); | 2200 | UINT32_MAX); |
2193 | op->peer = msg->target_peer; | 2201 | op->peer = msg->target_peer; |
2202 | op->return_intersection = htonl (msg->return_intersection); | ||
2194 | op->client_request_id = ntohl (msg->request_id); | 2203 | op->client_request_id = ntohl (msg->request_id); |
2195 | context = GNUNET_MQ_extract_nested_mh (msg); | 2204 | context = GNUNET_MQ_extract_nested_mh (msg); |
2196 | 2205 | ||
@@ -2354,9 +2363,14 @@ handle_client_accept (void *cls, | |||
2354 | (uint32_t) ntohl (msg->accept_reject_id)); | 2363 | (uint32_t) ntohl (msg->accept_reject_id)); |
2355 | listener = op->listener; | 2364 | listener = op->listener; |
2356 | op->listener = NULL; | 2365 | op->listener = NULL; |
2357 | GNUNET_CONTAINER_DLL_remove (listener->op_head, listener->op_tail, op); | 2366 | op->return_intersection = htonl (msg->return_intersection); |
2367 | GNUNET_CONTAINER_DLL_remove (listener->op_head, | ||
2368 | listener->op_tail, | ||
2369 | op); | ||
2358 | op->set = set; | 2370 | op->set = set; |
2359 | GNUNET_CONTAINER_DLL_insert (set->ops_head, set->ops_tail, op); | 2371 | GNUNET_CONTAINER_DLL_insert (set->ops_head, |
2372 | set->ops_tail, | ||
2373 | op); | ||
2360 | op->client_request_id = ntohl (msg->request_id); | 2374 | op->client_request_id = ntohl (msg->request_id); |
2361 | 2375 | ||
2362 | /* Advance generation values, so that future mutations do not | 2376 | /* Advance generation values, so that future mutations do not |