GNUNET_SCALARPRODUCT_ContinuationWithStatus cont,
void *cont_cls)
{
- GNUNET_MQ_hd_var_size (response,
- GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
- struct ClientResponseMessage);
struct GNUNET_SCALARPRODUCT_ComputationHandle *h
= GNUNET_new (struct GNUNET_SCALARPRODUCT_ComputationHandle);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_response_handler (h),
+ GNUNET_MQ_hd_var_size (response,
+ GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
+ struct ClientResponseMessage,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
h->response_proc = &process_status_message;
h->cfg = cfg;
h->key = *session_key;
- h->mq = GNUNET_CLIENT_connecT (cfg,
+ h->mq = GNUNET_CLIENT_connect (cfg,
"scalarproduct-bob",
handlers,
&mq_error_handler,
msg->element_count_total = htonl (element_count);
msg->element_count_contained = htonl (todo);
msg->session_key = *session_key;
- memcpy (&msg[1],
+ GNUNET_memcpy (&msg[1],
elements,
size);
element_count_transfered = todo;
size = todo * sizeof (struct GNUNET_SCALARPRODUCT_Element);
env = GNUNET_MQ_msg_extra (mmsg,
size,
- GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MUTLIPART_BOB);
+ GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MULTIPART_BOB);
mmsg->element_count_contained = htonl (todo);
- memcpy (&mmsg[1],
+ GNUNET_memcpy (&mmsg[1],
&elements[element_count_transfered],
size);
element_count_transfered += todo;
GNUNET_SCALARPRODUCT_DatumProcessor cont,
void *cont_cls)
{
- GNUNET_MQ_hd_var_size (response,
- GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
- struct ClientResponseMessage);
struct GNUNET_SCALARPRODUCT_ComputationHandle *h
= GNUNET_new (struct GNUNET_SCALARPRODUCT_ComputationHandle);
struct GNUNET_MQ_MessageHandler handlers[] = {
- make_response_handler (h),
+ GNUNET_MQ_hd_var_size (response,
+ GNUNET_MESSAGE_TYPE_SCALARPRODUCT_RESULT,
+ struct ClientResponseMessage,
+ h),
GNUNET_MQ_handler_end ()
};
struct GNUNET_MQ_Envelope *env;
if (GNUNET_SYSERR == check_unique (elements,
element_count))
return NULL;
- h->mq = GNUNET_CLIENT_connecT (cfg,
+ h->mq = GNUNET_CLIENT_connect (cfg,
"scalarproduct-alice",
handlers,
&mq_error_handler,
msg->reserved = htonl (0);
msg->peer = *peer;
msg->session_key = *session_key;
- memcpy (&msg[1],
+ GNUNET_memcpy (&msg[1],
elements,
size);
GNUNET_MQ_send (h->mq,
size = todo * sizeof (struct GNUNET_SCALARPRODUCT_Element);
env = GNUNET_MQ_msg_extra (mmsg,
size,
- GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MUTLIPART_ALICE);
+ GNUNET_MESSAGE_TYPE_SCALARPRODUCT_CLIENT_MULTIPART_ALICE);
mmsg->element_count_contained = htonl (todo);
- memcpy (&mmsg[1],
+ GNUNET_memcpy (&mmsg[1],
&elements[element_count_transfered],
size);
element_count_transfered += todo;