diff options
Diffstat (limited to 'toxcore/TCP_server.c')
-rw-r--r-- | toxcore/TCP_server.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/toxcore/TCP_server.c b/toxcore/TCP_server.c index 2dcd6f50..d055215e 100644 --- a/toxcore/TCP_server.c +++ b/toxcore/TCP_server.c | |||
@@ -99,7 +99,7 @@ static int realloc_connection(TCP_Server *TCP_server, uint32_t num) | |||
99 | */ | 99 | */ |
100 | static int get_TCP_connection_index(TCP_Server *TCP_server, uint8_t *public_key) | 100 | static int get_TCP_connection_index(TCP_Server *TCP_server, uint8_t *public_key) |
101 | { | 101 | { |
102 | return list_find(&TCP_server->accepted_key_list, public_key); | 102 | return bs_list_find(&TCP_server->accepted_key_list, public_key); |
103 | } | 103 | } |
104 | 104 | ||
105 | 105 | ||
@@ -140,7 +140,7 @@ static int add_accepted(TCP_Server *TCP_server, TCP_Secure_Connection *con) | |||
140 | return -1; | 140 | return -1; |
141 | } | 141 | } |
142 | 142 | ||
143 | if (!list_add(&TCP_server->accepted_key_list, con->public_key, index)) | 143 | if (!bs_list_add(&TCP_server->accepted_key_list, con->public_key, index)) |
144 | return -1; | 144 | return -1; |
145 | 145 | ||
146 | memcpy(&TCP_server->accepted_connection_array[index], con, sizeof(TCP_Secure_Connection)); | 146 | memcpy(&TCP_server->accepted_connection_array[index], con, sizeof(TCP_Secure_Connection)); |
@@ -166,7 +166,7 @@ static int del_accepted(TCP_Server *TCP_server, int index) | |||
166 | if (TCP_server->accepted_connection_array[index].status == TCP_STATUS_NO_STATUS) | 166 | if (TCP_server->accepted_connection_array[index].status == TCP_STATUS_NO_STATUS) |
167 | return -1; | 167 | return -1; |
168 | 168 | ||
169 | if (!list_remove(&TCP_server->accepted_key_list, TCP_server->accepted_connection_array[index].public_key, index)) | 169 | if (!bs_list_remove(&TCP_server->accepted_key_list, TCP_server->accepted_connection_array[index].public_key, index)) |
170 | return -1; | 170 | return -1; |
171 | 171 | ||
172 | memset(&TCP_server->accepted_connection_array[index], 0, sizeof(TCP_Secure_Connection)); | 172 | memset(&TCP_server->accepted_connection_array[index], 0, sizeof(TCP_Secure_Connection)); |
@@ -914,7 +914,7 @@ TCP_Server *new_TCP_server(uint8_t ipv6_enabled, uint16_t num_sockets, uint16_t | |||
914 | memcpy(temp->public_key, public_key, crypto_box_PUBLICKEYBYTES); | 914 | memcpy(temp->public_key, public_key, crypto_box_PUBLICKEYBYTES); |
915 | memcpy(temp->secret_key, secret_key, crypto_box_SECRETKEYBYTES); | 915 | memcpy(temp->secret_key, secret_key, crypto_box_SECRETKEYBYTES); |
916 | 916 | ||
917 | list_init(&temp->accepted_key_list, crypto_box_PUBLICKEYBYTES); | 917 | bs_list_init(&temp->accepted_key_list, crypto_box_PUBLICKEYBYTES); |
918 | 918 | ||
919 | return temp; | 919 | return temp; |
920 | } | 920 | } |
@@ -1229,7 +1229,7 @@ void kill_TCP_server(TCP_Server *TCP_server) | |||
1229 | set_callback_handle_recv_1(TCP_server->onion, NULL, NULL); | 1229 | set_callback_handle_recv_1(TCP_server->onion, NULL, NULL); |
1230 | } | 1230 | } |
1231 | 1231 | ||
1232 | list_free(&TCP_server->accepted_key_list); | 1232 | bs_list_free(&TCP_server->accepted_key_list); |
1233 | 1233 | ||
1234 | #ifdef TCP_SERVER_USE_EPOLL | 1234 | #ifdef TCP_SERVER_USE_EPOLL |
1235 | close(TCP_server->efd); | 1235 | close(TCP_server->efd); |