indentation, comment and style fixes, no semantic changes
[oweals/gnunet.git] / src / scalarproduct / scalarproduct_api.c
index 8639b4e5a325ee1c3507657353ea9dcde4692d7a..df9f8d196c52e69ad7808e9ab4953de4650ed8cb 100644 (file)
@@ -230,13 +230,13 @@ GNUNET_SCALARPRODUCT_accept_computation (const struct GNUNET_CONFIGURATION_Handl
                                          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;
@@ -256,7 +256,7 @@ GNUNET_SCALARPRODUCT_accept_computation (const struct GNUNET_CONFIGURATION_Handl
   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,
@@ -279,7 +279,7 @@ GNUNET_SCALARPRODUCT_accept_computation (const struct GNUNET_CONFIGURATION_Handl
   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;
@@ -294,9 +294,9 @@ GNUNET_SCALARPRODUCT_accept_computation (const struct GNUNET_CONFIGURATION_Handl
     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;
@@ -388,13 +388,13 @@ GNUNET_SCALARPRODUCT_start_computation (const struct GNUNET_CONFIGURATION_Handle
                                         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;
@@ -408,7 +408,7 @@ GNUNET_SCALARPRODUCT_start_computation (const struct GNUNET_CONFIGURATION_Handle
   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,
@@ -439,7 +439,7 @@ GNUNET_SCALARPRODUCT_start_computation (const struct GNUNET_CONFIGURATION_Handle
   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,
@@ -454,9 +454,9 @@ GNUNET_SCALARPRODUCT_start_computation (const struct GNUNET_CONFIGURATION_Handle
     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;