summaryrefslogtreecommitdiff
path: root/toxcore/TCP_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/TCP_server.c')
-rw-r--r--toxcore/TCP_server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/TCP_server.c b/toxcore/TCP_server.c
index f07df2c6..cf997d34 100644
--- a/toxcore/TCP_server.c
+++ b/toxcore/TCP_server.c
@@ -939,8 +939,8 @@ static sock_t new_listening_TCP_socket(int family, uint16_t port)
939 return sock; 939 return sock;
940} 940}
941 941
942TCP_Server *new_TCP_server(uint8_t ipv6_enabled, uint16_t num_sockets, const uint16_t *ports, const uint8_t *public_key, 942TCP_Server *new_TCP_server(uint8_t ipv6_enabled, uint16_t num_sockets, const uint16_t *ports, const uint8_t *secret_key,
943 const uint8_t *secret_key, Onion *onion) 943 Onion *onion)
944{ 944{
945 if (num_sockets == 0 || ports == NULL) 945 if (num_sockets == 0 || ports == NULL)
946 return NULL; 946 return NULL;
@@ -1015,8 +1015,8 @@ TCP_Server *new_TCP_server(uint8_t ipv6_enabled, uint16_t num_sockets, const uin
1015 set_callback_handle_recv_1(onion, &handle_onion_recv_1, temp); 1015 set_callback_handle_recv_1(onion, &handle_onion_recv_1, temp);
1016 } 1016 }
1017 1017
1018 memcpy(temp->public_key, public_key, crypto_box_PUBLICKEYBYTES);
1019 memcpy(temp->secret_key, secret_key, crypto_box_SECRETKEYBYTES); 1018 memcpy(temp->secret_key, secret_key, crypto_box_SECRETKEYBYTES);
1019 crypto_scalarmult_curve25519_base(temp->public_key, temp->secret_key);
1020 1020
1021 bs_list_init(&temp->accepted_key_list, crypto_box_PUBLICKEYBYTES, 8); 1021 bs_list_init(&temp->accepted_key_list, crypto_box_PUBLICKEYBYTES, 8);
1022 1022