Skip to content

Commit

Permalink
fix: Add missing htons call when adding configured TCP relay.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Nov 23, 2023
1 parent 814090f commit d1e850c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion auto_tests/dht_getnodes_api_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static void test_dht_getnodes(AutoTox *autotoxes)
tox_self_get_dht_id(autotoxes[i].tox, public_key_list[i]);
tox_callback_dht_get_nodes_response(autotoxes[i].tox, getnodes_response_cb);

printf("Peer %zu dht closenode count total/annouce-capable: %d/%d\n",
printf("Peer %zu dht closenode count total/announce-capable: %d/%d\n",
i,
tox_dht_get_num_closelist(autotoxes[i].tox),
tox_dht_get_num_closelist_announce_capable(autotoxes[i].tox)
Expand Down
2 changes: 1 addition & 1 deletion other/bootstrap_daemon/docker/tox-bootstrapd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
05c389460de83d58533a658d0df625600bc3e6940bbcc738db9dddee249fac59 /usr/local/bin/tox-bootstrapd
1608abb52cd16775216d01d06569e6437d86ed11e9fc8dc6dc9c1c28668ccd8b /usr/local/bin/tox-bootstrapd
2 changes: 1 addition & 1 deletion toxcore/Messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2627,7 +2627,7 @@ void do_messenger(Messenger *m, void *userdata)
if (m->tcp_server != nullptr) {
/* Add self tcp server. */
IP_Port local_ip_port;
local_ip_port.port = m->options.tcp_server_port;
local_ip_port.port = net_htons(m->options.tcp_server_port);
local_ip_port.ip.family = net_family_ipv4();
local_ip_port.ip.ip.v4 = get_ip4_loopback();
add_tcp_relay(m->net_crypto, &local_ip_port, tcp_server_public_key(m->tcp_server));
Expand Down

0 comments on commit d1e850c

Please sign in to comment.