/*
This file is part of GNUnet
- Copyright (C) 2013, 2014 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2013, 2014 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
* client.
*/
PHASE_FINISHED
+
};
rm->result_status = htons (GNUNET_SET_STATUS_OK);
rm->request_id = htonl (op->spec->client_request_id);
rm->element_type = element->element_type;
- memcpy (&rm[1],
+ GNUNET_memcpy (&rm[1],
element->data,
element->size);
GNUNET_MQ_send (op->spec->set->client_mq,
GNUNET_h2s (&ee->element_hash),
ee->element.size);
- if ( (op->generation_created < ee->generation_removed) &&
- (op->generation_created >= ee->generation_added) )
+ if (GNUNET_NO == _GSS_is_element_of_operation (ee, op))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Reduced initialization, not starting with %s:%u (wrong generation)\n",
ev = GNUNET_MQ_msg_extra (msg,
chunk_size,
GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_BF);
- memcpy (&msg[1],
+ GNUNET_memcpy (&msg[1],
&bf_data[offset],
chunk_size);
offset += chunk_size;
rm->result_status = htons (GNUNET_SET_STATUS_OK);
rm->request_id = htonl (op->spec->client_request_id);
rm->element_type = element->element_type;
- memcpy (&rm[1],
+ GNUNET_memcpy (&rm[1],
element->data,
element->size);
GNUNET_MQ_notify_sent (ev,
op->state->phase,
op->spec->remote_element_count,
op->state->my_element_count,
- GNUNET_CONTAINER_multihashmap_size (op->spec->set->elements));
+ GNUNET_CONTAINER_multihashmap_size (op->spec->set->content->elements));
switch (op->state->phase)
{
case PHASE_INITIAL:
= GNUNET_CONTAINER_multihashmap_create (op->spec->remote_element_count,
GNUNET_YES);
op->state->my_element_count = 0;
- GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->elements,
+ GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->content->elements,
&filtered_map_initialization,
op);
break;
return;
}
}
- memcpy (&op->state->bf_data[op->state->bf_data_offset],
+ GNUNET_memcpy (&op->state->bf_data[op->state->bf_data_offset],
(const char*) &msg[1],
chunk_size);
op->state->bf_data_offset += chunk_size;
struct ElementEntry *ee = value;
struct Operation *op = cls;
- if ( (op->generation_created < ee->generation_removed) &&
- (op->generation_created >= ee->generation_added) )
+ if (GNUNET_NO == _GSS_is_element_of_operation (ee, op))
return GNUNET_YES; /* element not live in operation's generation */
GNUNET_CRYPTO_hash_xor (&op->state->my_xor,
&ee->element_hash,
op->state->my_elements
= GNUNET_CONTAINER_multihashmap_create (op->state->my_element_count,
GNUNET_YES);
- GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->elements,
+ GNUNET_CONTAINER_multihashmap_iterate (op->spec->set->content->elements,
&initialize_map_unfiltered,
op);
send_bloomfilter (op);
{
/* the context message is too large!? */
GNUNET_break (0);
- GNUNET_SERVER_client_disconnect (op->spec->set->client);
+ GNUNET_SERVICE_client_drop (op->spec->set->client);
return;
}
msg->operation = htonl (GNUNET_SET_OPERATION_INTERSECTION);
- msg->app_id = op->spec->app_id;
msg->element_count = htonl (op->state->my_element_count);
GNUNET_MQ_send (op->mq,
ev);