From 30b74c15b7f76b0371495f79447a8aaebcc71636 Mon Sep 17 00:00:00 2001 From: Christian Fuchs Date: Wed, 11 Sep 2013 12:20:03 +0000 Subject: added propper shutdown task to SP-client fixed a logics mixup in the SP-API between alice's client and bob's client-function fixed a memory allocation bug in SP-API adjusted message formats to use uint32_t instead of 16 for all element counts and mask lengths --- src/scalarproduct/scalarproduct.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/scalarproduct/scalarproduct.h') diff --git a/src/scalarproduct/scalarproduct.h b/src/scalarproduct/scalarproduct.h index 9304c0c7e..02c6d8b21 100644 --- a/src/scalarproduct/scalarproduct.h +++ b/src/scalarproduct/scalarproduct.h @@ -73,12 +73,12 @@ struct GNUNET_SCALARPRODUCT_client_request /** * how many elements the vector in payload contains */ - uint16_t element_count GNUNET_PACKED; + uint32_t element_count GNUNET_PACKED; /** * how many bytes the mask has */ - uint16_t mask_length GNUNET_PACKED; + uint32_t mask_length GNUNET_PACKED; /** * the transaction/session key used to identify a session @@ -108,12 +108,12 @@ struct GNUNET_SCALARPRODUCT_service_request { /** * how many bytes the mask has */ - uint16_t mask_length GNUNET_PACKED; + uint32_t mask_length GNUNET_PACKED; /** * the length of the publickey contained within this message */ - uint16_t pk_length GNUNET_PACKED; + uint32_t pk_length GNUNET_PACKED; /** * the transaction/session key used to identify a session @@ -123,12 +123,12 @@ struct GNUNET_SCALARPRODUCT_service_request { /** * how many elements the vector in payload contains */ - uint16_t element_count GNUNET_PACKED; + uint32_t element_count GNUNET_PACKED; /** * how many elements are actually included after the mask was applied. */ - uint16_t used_element_count GNUNET_PACKED; + uint32_t used_element_count GNUNET_PACKED; /** * followed by mask | public_key | vector[used_element_count] @@ -148,12 +148,12 @@ struct GNUNET_SCALARPRODUCT_service_response { /** * how many elements the vector in payload contains */ - uint16_t element_count GNUNET_PACKED; + uint32_t element_count GNUNET_PACKED; /** * how many elements are actually included after the mask was applied. */ - uint16_t used_element_count GNUNET_PACKED; + uint32_t used_element_count GNUNET_PACKED; /** * the transaction/session key used to identify a session -- cgit v1.2.3