aboutsummaryrefslogtreecommitdiff
path: root/src/psyc
diff options
context:
space:
mode:
authorDavid Barksdale <amatus.amongus@gmail.com>2015-07-19 15:35:07 +0000
committerDavid Barksdale <amatus.amongus@gmail.com>2015-07-19 15:35:07 +0000
commita5e12b53160fbf359dd469408c600f0eb976590b (patch)
treee59bee9ea565e3f9a3f976d939d4c566f29563d5 /src/psyc
parentbba1229ab25ed0ae236c3062e371bb97d9a05375 (diff)
downloadgnunet-a5e12b53160fbf359dd469408c600f0eb976590b.tar.gz
gnunet-a5e12b53160fbf359dd469408c600f0eb976590b.zip
Remove this GNUNET_htonl_signed nonsense
Diffstat (limited to 'src/psyc')
-rw-r--r--src/psyc/gnunet-service-psyc.c12
-rw-r--r--src/psyc/psyc_api.c6
2 files changed, 9 insertions, 9 deletions
diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c
index 29ef07f10..4c34f6108 100644
--- a/src/psyc/gnunet-service-psyc.c
+++ b/src/psyc/gnunet-service-psyc.c
@@ -653,7 +653,7 @@ client_send_result (struct GNUNET_SERVER_Client *client, uint64_t op_id,
653 res = GNUNET_malloc (sizeof (*res) + data_size); 653 res = GNUNET_malloc (sizeof (*res) + data_size);
654 res->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE); 654 res->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_RESULT_CODE);
655 res->header.size = htons (sizeof (*res) + data_size); 655 res->header.size = htons (sizeof (*res) + data_size);
656 res->result_code = GNUNET_htonll_signed (result_code); 656 res->result_code = GNUNET_htonll (result_code);
657 res->op_id = op_id; 657 res->op_id = op_id;
658 if (0 < data_size) 658 if (0 < data_size)
659 memcpy (&res[1], data, data_size); 659 memcpy (&res[1], data, data_size);
@@ -1544,7 +1544,7 @@ store_recv_master_counters (void *cls, int result, uint64_t max_fragment_id,
1544 struct GNUNET_PSYC_CountersResultMessage res; 1544 struct GNUNET_PSYC_CountersResultMessage res;
1545 res.header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK); 1545 res.header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK);
1546 res.header.size = htons (sizeof (res)); 1546 res.header.size = htons (sizeof (res));
1547 res.result_code = GNUNET_htonl_signed (result); 1547 res.result_code = htonl (result);
1548 res.max_message_id = GNUNET_htonll (max_message_id); 1548 res.max_message_id = GNUNET_htonll (max_message_id);
1549 1549
1550 if (GNUNET_OK == result || GNUNET_NO == result) 1550 if (GNUNET_OK == result || GNUNET_NO == result)
@@ -1590,7 +1590,7 @@ store_recv_slave_counters (void *cls, int result, uint64_t max_fragment_id,
1590 struct GNUNET_PSYC_CountersResultMessage res; 1590 struct GNUNET_PSYC_CountersResultMessage res;
1591 res.header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK); 1591 res.header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK);
1592 res.header.size = htons (sizeof (res)); 1592 res.header.size = htons (sizeof (res));
1593 res.result_code = GNUNET_htonl_signed (result); 1593 res.result_code = htonl (result);
1594 res.max_message_id = GNUNET_htonll (max_message_id); 1594 res.max_message_id = GNUNET_htonll (max_message_id);
1595 1595
1596 if (GNUNET_OK == result || GNUNET_NO == result) 1596 if (GNUNET_OK == result || GNUNET_NO == result)
@@ -1680,7 +1680,7 @@ client_recv_master_start (void *cls, struct GNUNET_SERVER_Client *client,
1680 struct GNUNET_PSYC_CountersResultMessage res; 1680 struct GNUNET_PSYC_CountersResultMessage res;
1681 res.header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK); 1681 res.header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_MASTER_START_ACK);
1682 res.header.size = htons (sizeof (res)); 1682 res.header.size = htons (sizeof (res));
1683 res.result_code = GNUNET_htonl_signed (GNUNET_OK); 1683 res.result_code = htonl (GNUNET_OK);
1684 res.max_message_id = GNUNET_htonll (mst->max_message_id); 1684 res.max_message_id = GNUNET_htonll (mst->max_message_id);
1685 1685
1686 GNUNET_SERVER_notification_context_add (nc, client); 1686 GNUNET_SERVER_notification_context_add (nc, client);
@@ -1791,7 +1791,7 @@ client_recv_slave_join (void *cls, struct GNUNET_SERVER_Client *client,
1791 struct GNUNET_PSYC_CountersResultMessage res; 1791 struct GNUNET_PSYC_CountersResultMessage res;
1792 res.header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK); 1792 res.header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_SLAVE_JOIN_ACK);
1793 res.header.size = htons (sizeof (res)); 1793 res.header.size = htons (sizeof (res));
1794 res.result_code = GNUNET_htonl_signed (GNUNET_OK); 1794 res.result_code = htonl (GNUNET_OK);
1795 res.max_message_id = GNUNET_htonll (chn->max_message_id); 1795 res.max_message_id = GNUNET_htonll (chn->max_message_id);
1796 1796
1797 GNUNET_SERVER_notification_context_add (nc, client); 1797 GNUNET_SERVER_notification_context_add (nc, client);
@@ -2310,7 +2310,7 @@ store_recv_fragment_history (void *cls,
2310 res->header.size = htons (sizeof (*res) + psize); 2310 res->header.size = htons (sizeof (*res) + psize);
2311 res->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT); 2311 res->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_HISTORY_RESULT);
2312 res->op_id = op->op_id; 2312 res->op_id = op->op_id;
2313 res->result_code = GNUNET_htonll_signed (GNUNET_OK); 2313 res->result_code = GNUNET_htonll (GNUNET_OK);
2314 2314
2315 pmsg = (struct GNUNET_PSYC_MessageHeader *) &res[1]; 2315 pmsg = (struct GNUNET_PSYC_MessageHeader *) &res[1];
2316 psyc_msg_init (pmsg, mmsg, flags | GNUNET_PSYC_MESSAGE_HISTORIC); 2316 psyc_msg_init (pmsg, mmsg, flags | GNUNET_PSYC_MESSAGE_HISTORIC);
diff --git a/src/psyc/psyc_api.c b/src/psyc/psyc_api.c
index 048257bdc..5fc5391a0 100644
--- a/src/psyc/psyc_api.c
+++ b/src/psyc/psyc_api.c
@@ -263,7 +263,7 @@ channel_recv_result (void *cls,
263 uint16_t data_size = size - sizeof (*res); 263 uint16_t data_size = size - sizeof (*res);
264 const char *data = (0 < data_size) ? (void *) &res[1] : NULL; 264 const char *data = (0 < data_size) ? (void *) &res[1] : NULL;
265 GNUNET_CLIENT_MANAGER_op_result (chn->client, GNUNET_ntohll (res->op_id), 265 GNUNET_CLIENT_MANAGER_op_result (chn->client, GNUNET_ntohll (res->op_id),
266 GNUNET_ntohll_signed (res->result_code), 266 GNUNET_ntohll (res->result_code),
267 data, data_size); 267 data, data_size);
268} 268}
269 269
@@ -433,7 +433,7 @@ master_recv_start_ack (void *cls,
433 433
434 struct GNUNET_PSYC_CountersResultMessage * 434 struct GNUNET_PSYC_CountersResultMessage *
435 cres = (struct GNUNET_PSYC_CountersResultMessage *) msg; 435 cres = (struct GNUNET_PSYC_CountersResultMessage *) msg;
436 int32_t result = GNUNET_ntohl_signed (cres->result_code); 436 int32_t result = ntohl (cres->result_code);
437 if (GNUNET_OK != result && GNUNET_NO != result) 437 if (GNUNET_OK != result && GNUNET_NO != result)
438 { 438 {
439 LOG (GNUNET_ERROR_TYPE_ERROR, "Could not start master: %ld\n", result); 439 LOG (GNUNET_ERROR_TYPE_ERROR, "Could not start master: %ld\n", result);
@@ -486,7 +486,7 @@ slave_recv_join_ack (void *cls,
486 sizeof (struct GNUNET_PSYC_Channel)); 486 sizeof (struct GNUNET_PSYC_Channel));
487 struct GNUNET_PSYC_CountersResultMessage * 487 struct GNUNET_PSYC_CountersResultMessage *
488 cres = (struct GNUNET_PSYC_CountersResultMessage *) msg; 488 cres = (struct GNUNET_PSYC_CountersResultMessage *) msg;
489 int32_t result = GNUNET_ntohl_signed (cres->result_code); 489 int32_t result = ntohl (cres->result_code);
490 if (GNUNET_YES != result && GNUNET_NO != result) 490 if (GNUNET_YES != result && GNUNET_NO != result)
491 { 491 {
492 LOG (GNUNET_ERROR_TYPE_ERROR, "Could not join slave.\n"); 492 LOG (GNUNET_ERROR_TYPE_ERROR, "Could not join slave.\n");