diff options
Diffstat (limited to 'src/set/gnunet-service-set_union.c')
-rw-r--r-- | src/set/gnunet-service-set_union.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/set/gnunet-service-set_union.c b/src/set/gnunet-service-set_union.c index b088ff634..b09e9d2a6 100644 --- a/src/set/gnunet-service-set_union.c +++ b/src/set/gnunet-service-set_union.c | |||
@@ -515,18 +515,16 @@ init_key_to_element_iterator (void *cls, | |||
515 | void *value) | 515 | void *value) |
516 | { | 516 | { |
517 | struct Operation *op = cls; | 517 | struct Operation *op = cls; |
518 | struct ElementEntry *e = value; | 518 | struct ElementEntry *ee = value; |
519 | 519 | ||
520 | /* make sure that the element belongs to the set at the time | 520 | /* make sure that the element belongs to the set at the time |
521 | * of creating the operation */ | 521 | * of creating the operation */ |
522 | if ( (e->generation_added > op->generation_created) || | 522 | if (GNUNET_NO == _GSS_is_element_of_operation (ee, op)) |
523 | ( (GNUNET_YES == e->removed) && | ||
524 | (e->generation_removed < op->generation_created))) | ||
525 | return GNUNET_YES; | 523 | return GNUNET_YES; |
526 | 524 | ||
527 | GNUNET_assert (GNUNET_NO == e->remote); | 525 | GNUNET_assert (GNUNET_NO == ee->remote); |
528 | 526 | ||
529 | op_register_element (op, e); | 527 | op_register_element (op, ee); |
530 | return GNUNET_YES; | 528 | return GNUNET_YES; |
531 | } | 529 | } |
532 | 530 | ||
@@ -546,9 +544,9 @@ prepare_ibf (struct Operation *op, | |||
546 | { | 544 | { |
547 | unsigned int len; | 545 | unsigned int len; |
548 | 546 | ||
549 | len = GNUNET_CONTAINER_multihashmap_size (op->spec->set->elements); | 547 | len = GNUNET_CONTAINER_multihashmap_size (op->spec->set->content->elements); |
550 | op->state->key_to_element = GNUNET_CONTAINER_multihashmap32_create (len + 1); | 548 | op->state->key_to_element = GNUNET_CONTAINER_multihashmap32_create (len + 1); |
551 | GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->elements, | 549 | GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->content->elements, |
552 | init_key_to_element_iterator, op); | 550 | init_key_to_element_iterator, op); |
553 | } | 551 | } |
554 | if (NULL != op->state->local_ibf) | 552 | if (NULL != op->state->local_ibf) |