diff options
Diffstat (limited to 'src/reclaim/gnunet-service-reclaim.c')
-rw-r--r-- | src/reclaim/gnunet-service-reclaim.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/reclaim/gnunet-service-reclaim.c b/src/reclaim/gnunet-service-reclaim.c index 4c80d6d24..2cf223173 100644 --- a/src/reclaim/gnunet-service-reclaim.c +++ b/src/reclaim/gnunet-service-reclaim.c @@ -681,7 +681,7 @@ send_ticket_result (const struct IdpClient *client, } // TODO add success member irm->id = htonl (r_id); - irm->presentations_len = htons (pres_len); + irm->presentations_len = htonl (pres_len); if (NULL != presentations) { GNUNET_RECLAIM_presentation_list_serialize (presentations, @@ -745,7 +745,7 @@ check_issue_ticket_message (void *cls, const struct IssueTicketMessage *im) size_t pkey_len; size = ntohs (im->header.size); - attrs_len = ntohs (im->attr_len); + attrs_len = ntohl (im->attr_len); key_len = ntohl (im->key_len); pkey_len = ntohl (im->pkey_len); if (size != attrs_len + key_len + pkey_len + sizeof(struct @@ -806,7 +806,7 @@ handle_issue_ticket_message (void *cls, const struct IssueTicketMessage *im) } buf += read; tio = GNUNET_new (struct TicketIssueOperation); - attrs_len = ntohs (im->attr_len); + attrs_len = ntohl (im->attr_len); attrs = GNUNET_RECLAIM_attribute_list_deserialize (buf, attrs_len); for (le = attrs->list_head; NULL != le; le = le->next) @@ -972,8 +972,8 @@ consume_result_cb (void *cls, attrs_len + pres_len + key_len, GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT); crm->id = htonl (cop->r_id); - crm->attrs_len = htons (attrs_len); - crm->presentations_len = htons (pres_len); + crm->attrs_len = htonl (attrs_len); + crm->presentations_len = htonl (pres_len); crm->key_len = htonl (key_len); crm->result = htonl (success); data_tmp = (char *) &crm[1]; @@ -1196,7 +1196,7 @@ handle_attribute_store_message (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received ATTRIBUTE_STORE message\n"); - data_len = ntohs (sam->attr_len); + data_len = ntohl (sam->attr_len); key_len = ntohl (sam->key_len); buf = (char *) &sam[1]; if ((GNUNET_SYSERR == @@ -1397,7 +1397,7 @@ handle_credential_store_message (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received CREDENTIAL_STORE message\n"); - data_len = ntohs (sam->attr_len); + data_len = ntohl (sam->attr_len); key_len = ntohl (sam->key_len); buf = (char *) &sam[1]; if ((GNUNET_SYSERR == @@ -1868,7 +1868,7 @@ handle_attribute_delete_message (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received ATTRIBUTE_DELETE message\n"); - data_len = ntohs (dam->attr_len); + data_len = ntohl (dam->attr_len); key_len = ntohl (dam->key_len); buf = (char *) &dam[1]; if ((GNUNET_SYSERR == @@ -1975,7 +1975,7 @@ handle_credential_delete_message (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received CREDENTIAL_DELETE message\n"); - data_len = ntohs (dam->attr_len); + data_len = ntohl (dam->attr_len); key_len = ntohl (dam->key_len); buf = (char *) &dam[1]; if ((GNUNET_SYSERR == @@ -2032,7 +2032,7 @@ attr_iter_finished (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending ATTRIBUTE_RESULT message\n"); env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); arm->id = htonl (ai->request_id); - arm->attr_len = htons (0); + arm->attr_len = htonl (0); arm->pkey_len = htonl (0); GNUNET_MQ_send (ai->client->mq, env); GNUNET_CONTAINER_DLL_remove (ai->client->attr_iter_head, @@ -2097,7 +2097,7 @@ attr_iter_cb (void *cls, rd->data_size + key_len, GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); arm->id = htonl (ai->request_id); - arm->attr_len = htons (rd->data_size); + arm->attr_len = htonl (rd->data_size); data_tmp = (char *) &arm[1]; arm->pkey_len = htonl (key_len); written = GNUNET_IDENTITY_write_public_key_to_buffer (&identity, @@ -2119,7 +2119,7 @@ check_iteration_start ( size_t key_len; size = ntohs (ais_msg->header.size); - key_len = ntohs (ais_msg->key_len); + key_len = ntohl (ais_msg->key_len); if (size < key_len + sizeof(*ais_msg)) { @@ -2262,7 +2262,7 @@ cred_iter_finished (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending CREDENTIAL_RESULT message\n"); env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_RESULT); arm->id = htonl (ai->request_id); - arm->credential_len = htons (0); + arm->credential_len = htonl (0); GNUNET_MQ_send (ai->client->mq, env); GNUNET_CONTAINER_DLL_remove (ai->client->cred_iter_head, ai->client->cred_iter_tail, @@ -2326,7 +2326,7 @@ cred_iter_cb (void *cls, rd->data_size + key_len, GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_RESULT); arm->id = htonl (ai->request_id); - arm->credential_len = htons (rd->data_size); + arm->credential_len = htonl (rd->data_size); data_tmp = (char *) &arm[1]; written = GNUNET_IDENTITY_write_public_key_to_buffer (&identity, data_tmp, @@ -2346,7 +2346,7 @@ check_credential_iteration_start ( size_t key_len; size = ntohs (cis_msg->header.size); - key_len = ntohs (cis_msg->key_len); + key_len = ntohl (cis_msg->key_len); if (size < key_len + sizeof(*cis_msg)) { @@ -2531,7 +2531,7 @@ check_ticket_iteration_start ( size_t key_len; size = ntohs (tis_msg->header.size); - key_len = ntohs (tis_msg->key_len); + key_len = ntohl (tis_msg->key_len); if (size < key_len + sizeof(*tis_msg)) { |