summaryrefslogtreecommitdiff
path: root/toxcore/TCP_server.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-02-14 20:51:55 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-02-14 20:51:55 +0000
commit35f13ef51dbf99c3d45d04f572e9e88795df7ae6 (patch)
tree8213605775c5f749fdabe683fbdea9106a6c32c1 /toxcore/TCP_server.c
parent17a0b617f299c34563960bd4e9ed9a88e76ba92f (diff)
Get rid of the only GNU extension we used.
Diffstat (limited to 'toxcore/TCP_server.c')
-rw-r--r--toxcore/TCP_server.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/toxcore/TCP_server.c b/toxcore/TCP_server.c
index d5772cc1..ae73b804 100644
--- a/toxcore/TCP_server.c
+++ b/toxcore/TCP_server.c
@@ -788,7 +788,7 @@ static int rm_connection_index(TCP_Server *TCP_server, TCP_Secure_Connection *co
788static int handle_onion_recv_1(void *object, IP_Port dest, const uint8_t *data, uint16_t length) 788static int handle_onion_recv_1(void *object, IP_Port dest, const uint8_t *data, uint16_t length)
789{ 789{
790 TCP_Server *TCP_server = (TCP_Server *)object; 790 TCP_Server *TCP_server = (TCP_Server *)object;
791 uint32_t index = dest.ip.ip6.uint32[0]; 791 uint32_t index = dest.ip.ip.v6.uint32[0];
792 792
793 if (index >= TCP_server->size_accepted_connections) { 793 if (index >= TCP_server->size_accepted_connections) {
794 return 1; 794 return 1;
@@ -796,7 +796,7 @@ static int handle_onion_recv_1(void *object, IP_Port dest, const uint8_t *data,
796 796
797 TCP_Secure_Connection *con = &TCP_server->accepted_connection_array[index]; 797 TCP_Secure_Connection *con = &TCP_server->accepted_connection_array[index];
798 798
799 if (con->identifier != dest.ip.ip6.uint64[1]) { 799 if (con->identifier != dest.ip.ip.v6.uint64[1]) {
800 return 1; 800 return 1;
801 } 801 }
802 802
@@ -896,9 +896,9 @@ static int handle_TCP_packet(TCP_Server *TCP_server, uint32_t con_id, const uint
896 IP_Port source; 896 IP_Port source;
897 source.port = 0; // dummy initialise 897 source.port = 0; // dummy initialise
898 source.ip.family = TCP_ONION_FAMILY; 898 source.ip.family = TCP_ONION_FAMILY;
899 source.ip.ip6.uint32[0] = con_id; 899 source.ip.ip.v6.uint32[0] = con_id;
900 source.ip.ip6.uint32[1] = 0; 900 source.ip.ip.v6.uint32[1] = 0;
901 source.ip.ip6.uint64[1] = con->identifier; 901 source.ip.ip.v6.uint64[1] = con->identifier;
902 onion_send_1(TCP_server->onion, data + 1 + CRYPTO_NONCE_SIZE, length - (1 + CRYPTO_NONCE_SIZE), source, 902 onion_send_1(TCP_server->onion, data + 1 + CRYPTO_NONCE_SIZE, length - (1 + CRYPTO_NONCE_SIZE), source,
903 data + 1); 903 data + 1);
904 } 904 }