aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/gnunet-service-reclaim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reclaim/gnunet-service-reclaim.c')
-rw-r--r--src/reclaim/gnunet-service-reclaim.c32
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,
681 } 681 }
682 // TODO add success member 682 // TODO add success member
683 irm->id = htonl (r_id); 683 irm->id = htonl (r_id);
684 irm->presentations_len = htons (pres_len); 684 irm->presentations_len = htonl (pres_len);
685 if (NULL != presentations) 685 if (NULL != presentations)
686 { 686 {
687 GNUNET_RECLAIM_presentation_list_serialize (presentations, 687 GNUNET_RECLAIM_presentation_list_serialize (presentations,
@@ -745,7 +745,7 @@ check_issue_ticket_message (void *cls, const struct IssueTicketMessage *im)
745 size_t pkey_len; 745 size_t pkey_len;
746 746
747 size = ntohs (im->header.size); 747 size = ntohs (im->header.size);
748 attrs_len = ntohs (im->attr_len); 748 attrs_len = ntohl (im->attr_len);
749 key_len = ntohl (im->key_len); 749 key_len = ntohl (im->key_len);
750 pkey_len = ntohl (im->pkey_len); 750 pkey_len = ntohl (im->pkey_len);
751 if (size != attrs_len + key_len + pkey_len + sizeof(struct 751 if (size != attrs_len + key_len + pkey_len + sizeof(struct
@@ -806,7 +806,7 @@ handle_issue_ticket_message (void *cls, const struct IssueTicketMessage *im)
806 } 806 }
807 buf += read; 807 buf += read;
808 tio = GNUNET_new (struct TicketIssueOperation); 808 tio = GNUNET_new (struct TicketIssueOperation);
809 attrs_len = ntohs (im->attr_len); 809 attrs_len = ntohl (im->attr_len);
810 attrs = GNUNET_RECLAIM_attribute_list_deserialize (buf, 810 attrs = GNUNET_RECLAIM_attribute_list_deserialize (buf,
811 attrs_len); 811 attrs_len);
812 for (le = attrs->list_head; NULL != le; le = le->next) 812 for (le = attrs->list_head; NULL != le; le = le->next)
@@ -972,8 +972,8 @@ consume_result_cb (void *cls,
972 attrs_len + pres_len + key_len, 972 attrs_len + pres_len + key_len,
973 GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT); 973 GNUNET_MESSAGE_TYPE_RECLAIM_CONSUME_TICKET_RESULT);
974 crm->id = htonl (cop->r_id); 974 crm->id = htonl (cop->r_id);
975 crm->attrs_len = htons (attrs_len); 975 crm->attrs_len = htonl (attrs_len);
976 crm->presentations_len = htons (pres_len); 976 crm->presentations_len = htonl (pres_len);
977 crm->key_len = htonl (key_len); 977 crm->key_len = htonl (key_len);
978 crm->result = htonl (success); 978 crm->result = htonl (success);
979 data_tmp = (char *) &crm[1]; 979 data_tmp = (char *) &crm[1];
@@ -1196,7 +1196,7 @@ handle_attribute_store_message (void *cls,
1196 1196
1197 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received ATTRIBUTE_STORE message\n"); 1197 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received ATTRIBUTE_STORE message\n");
1198 1198
1199 data_len = ntohs (sam->attr_len); 1199 data_len = ntohl (sam->attr_len);
1200 key_len = ntohl (sam->key_len); 1200 key_len = ntohl (sam->key_len);
1201 buf = (char *) &sam[1]; 1201 buf = (char *) &sam[1];
1202 if ((GNUNET_SYSERR == 1202 if ((GNUNET_SYSERR ==
@@ -1397,7 +1397,7 @@ handle_credential_store_message (void *cls,
1397 1397
1398 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received CREDENTIAL_STORE message\n"); 1398 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received CREDENTIAL_STORE message\n");
1399 1399
1400 data_len = ntohs (sam->attr_len); 1400 data_len = ntohl (sam->attr_len);
1401 key_len = ntohl (sam->key_len); 1401 key_len = ntohl (sam->key_len);
1402 buf = (char *) &sam[1]; 1402 buf = (char *) &sam[1];
1403 if ((GNUNET_SYSERR == 1403 if ((GNUNET_SYSERR ==
@@ -1868,7 +1868,7 @@ handle_attribute_delete_message (void *cls,
1868 1868
1869 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received ATTRIBUTE_DELETE message\n"); 1869 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received ATTRIBUTE_DELETE message\n");
1870 1870
1871 data_len = ntohs (dam->attr_len); 1871 data_len = ntohl (dam->attr_len);
1872 key_len = ntohl (dam->key_len); 1872 key_len = ntohl (dam->key_len);
1873 buf = (char *) &dam[1]; 1873 buf = (char *) &dam[1];
1874 if ((GNUNET_SYSERR == 1874 if ((GNUNET_SYSERR ==
@@ -1975,7 +1975,7 @@ handle_credential_delete_message (void *cls,
1975 1975
1976 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received CREDENTIAL_DELETE message\n"); 1976 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received CREDENTIAL_DELETE message\n");
1977 1977
1978 data_len = ntohs (dam->attr_len); 1978 data_len = ntohl (dam->attr_len);
1979 key_len = ntohl (dam->key_len); 1979 key_len = ntohl (dam->key_len);
1980 buf = (char *) &dam[1]; 1980 buf = (char *) &dam[1];
1981 if ((GNUNET_SYSERR == 1981 if ((GNUNET_SYSERR ==
@@ -2032,7 +2032,7 @@ attr_iter_finished (void *cls)
2032 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending ATTRIBUTE_RESULT message\n"); 2032 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending ATTRIBUTE_RESULT message\n");
2033 env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); 2033 env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT);
2034 arm->id = htonl (ai->request_id); 2034 arm->id = htonl (ai->request_id);
2035 arm->attr_len = htons (0); 2035 arm->attr_len = htonl (0);
2036 arm->pkey_len = htonl (0); 2036 arm->pkey_len = htonl (0);
2037 GNUNET_MQ_send (ai->client->mq, env); 2037 GNUNET_MQ_send (ai->client->mq, env);
2038 GNUNET_CONTAINER_DLL_remove (ai->client->attr_iter_head, 2038 GNUNET_CONTAINER_DLL_remove (ai->client->attr_iter_head,
@@ -2097,7 +2097,7 @@ attr_iter_cb (void *cls,
2097 rd->data_size + key_len, 2097 rd->data_size + key_len,
2098 GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT); 2098 GNUNET_MESSAGE_TYPE_RECLAIM_ATTRIBUTE_RESULT);
2099 arm->id = htonl (ai->request_id); 2099 arm->id = htonl (ai->request_id);
2100 arm->attr_len = htons (rd->data_size); 2100 arm->attr_len = htonl (rd->data_size);
2101 data_tmp = (char *) &arm[1]; 2101 data_tmp = (char *) &arm[1];
2102 arm->pkey_len = htonl (key_len); 2102 arm->pkey_len = htonl (key_len);
2103 written = GNUNET_IDENTITY_write_public_key_to_buffer (&identity, 2103 written = GNUNET_IDENTITY_write_public_key_to_buffer (&identity,
@@ -2119,7 +2119,7 @@ check_iteration_start (
2119 size_t key_len; 2119 size_t key_len;
2120 2120
2121 size = ntohs (ais_msg->header.size); 2121 size = ntohs (ais_msg->header.size);
2122 key_len = ntohs (ais_msg->key_len); 2122 key_len = ntohl (ais_msg->key_len);
2123 2123
2124 if (size < key_len + sizeof(*ais_msg)) 2124 if (size < key_len + sizeof(*ais_msg))
2125 { 2125 {
@@ -2262,7 +2262,7 @@ cred_iter_finished (void *cls)
2262 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending CREDENTIAL_RESULT message\n"); 2262 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending CREDENTIAL_RESULT message\n");
2263 env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_RESULT); 2263 env = GNUNET_MQ_msg (arm, GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_RESULT);
2264 arm->id = htonl (ai->request_id); 2264 arm->id = htonl (ai->request_id);
2265 arm->credential_len = htons (0); 2265 arm->credential_len = htonl (0);
2266 GNUNET_MQ_send (ai->client->mq, env); 2266 GNUNET_MQ_send (ai->client->mq, env);
2267 GNUNET_CONTAINER_DLL_remove (ai->client->cred_iter_head, 2267 GNUNET_CONTAINER_DLL_remove (ai->client->cred_iter_head,
2268 ai->client->cred_iter_tail, 2268 ai->client->cred_iter_tail,
@@ -2326,7 +2326,7 @@ cred_iter_cb (void *cls,
2326 rd->data_size + key_len, 2326 rd->data_size + key_len,
2327 GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_RESULT); 2327 GNUNET_MESSAGE_TYPE_RECLAIM_CREDENTIAL_RESULT);
2328 arm->id = htonl (ai->request_id); 2328 arm->id = htonl (ai->request_id);
2329 arm->credential_len = htons (rd->data_size); 2329 arm->credential_len = htonl (rd->data_size);
2330 data_tmp = (char *) &arm[1]; 2330 data_tmp = (char *) &arm[1];
2331 written = GNUNET_IDENTITY_write_public_key_to_buffer (&identity, 2331 written = GNUNET_IDENTITY_write_public_key_to_buffer (&identity,
2332 data_tmp, 2332 data_tmp,
@@ -2346,7 +2346,7 @@ check_credential_iteration_start (
2346 size_t key_len; 2346 size_t key_len;
2347 2347
2348 size = ntohs (cis_msg->header.size); 2348 size = ntohs (cis_msg->header.size);
2349 key_len = ntohs (cis_msg->key_len); 2349 key_len = ntohl (cis_msg->key_len);
2350 2350
2351 if (size < key_len + sizeof(*cis_msg)) 2351 if (size < key_len + sizeof(*cis_msg))
2352 { 2352 {
@@ -2531,7 +2531,7 @@ check_ticket_iteration_start (
2531 size_t key_len; 2531 size_t key_len;
2532 2532
2533 size = ntohs (tis_msg->header.size); 2533 size = ntohs (tis_msg->header.size);
2534 key_len = ntohs (tis_msg->key_len); 2534 key_len = ntohl (tis_msg->key_len);
2535 2535
2536 if (size < key_len + sizeof(*tis_msg)) 2536 if (size < key_len + sizeof(*tis_msg))
2537 { 2537 {