diff options
Diffstat (limited to 'other')
-rw-r--r-- | other/DHT_bootstrap.c | 6 | ||||
-rw-r--r-- | other/bootstrap_daemon/src/config.c | 2 | ||||
-rw-r--r-- | other/bootstrap_daemon/src/tox-bootstrapd.c | 4 | ||||
-rw-r--r-- | other/bootstrap_node_packets.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c index d7e66d33..a339119f 100644 --- a/other/DHT_bootstrap.c +++ b/other/DHT_bootstrap.c | |||
@@ -166,11 +166,11 @@ int main(int argc, char *argv[]) | |||
166 | fclose(file); | 166 | fclose(file); |
167 | 167 | ||
168 | printf("\n"); | 168 | printf("\n"); |
169 | printf("Port: %u\n", ntohs(dht->net->port)); | 169 | printf("Port: %u\n", net_ntohs(dht->net->port)); |
170 | 170 | ||
171 | if (argc > argvoffset + 3) { | 171 | if (argc > argvoffset + 3) { |
172 | printf("Trying to bootstrap into the network...\n"); | 172 | printf("Trying to bootstrap into the network...\n"); |
173 | uint16_t port = htons(atoi(argv[argvoffset + 2])); | 173 | uint16_t port = net_htons(atoi(argv[argvoffset + 2])); |
174 | uint8_t *bootstrap_key = hex_string_to_bin(argv[argvoffset + 3]); | 174 | uint8_t *bootstrap_key = hex_string_to_bin(argv[argvoffset + 3]); |
175 | int res = DHT_bootstrap_from_address(dht, argv[argvoffset + 1], | 175 | int res = DHT_bootstrap_from_address(dht, argv[argvoffset + 1], |
176 | ipv6enabled, port, bootstrap_key); | 176 | ipv6enabled, port, bootstrap_key); |
@@ -196,7 +196,7 @@ int main(int argc, char *argv[]) | |||
196 | do_DHT(dht); | 196 | do_DHT(dht); |
197 | 197 | ||
198 | if (is_timeout(last_LANdiscovery, is_waiting_for_dht_connection ? 5 : LAN_DISCOVERY_INTERVAL)) { | 198 | if (is_timeout(last_LANdiscovery, is_waiting_for_dht_connection ? 5 : LAN_DISCOVERY_INTERVAL)) { |
199 | send_LANdiscovery(htons(PORT), dht); | 199 | send_LANdiscovery(net_htons(PORT), dht); |
200 | last_LANdiscovery = unix_time(); | 200 | last_LANdiscovery = unix_time(); |
201 | } | 201 | } |
202 | 202 | ||
diff --git a/other/bootstrap_daemon/src/config.c b/other/bootstrap_daemon/src/config.c index aa8978a5..b45b05f9 100644 --- a/other/bootstrap_daemon/src/config.c +++ b/other/bootstrap_daemon/src/config.c | |||
@@ -406,7 +406,7 @@ int bootstrap_from_config(const char *cfg_file_path, DHT *dht, int enable_ipv6) | |||
406 | } | 406 | } |
407 | 407 | ||
408 | bs_public_key_bin = hex_string_to_bin(bs_public_key); | 408 | bs_public_key_bin = hex_string_to_bin(bs_public_key); |
409 | address_resolved = DHT_bootstrap_from_address(dht, bs_address, enable_ipv6, htons(bs_port), | 409 | address_resolved = DHT_bootstrap_from_address(dht, bs_address, enable_ipv6, net_htons(bs_port), |
410 | bs_public_key_bin); | 410 | bs_public_key_bin); |
411 | free(bs_public_key_bin); | 411 | free(bs_public_key_bin); |
412 | 412 | ||
diff --git a/other/bootstrap_daemon/src/tox-bootstrapd.c b/other/bootstrap_daemon/src/tox-bootstrapd.c index 1c4b11b6..9f67458b 100644 --- a/other/bootstrap_daemon/src/tox-bootstrapd.c +++ b/other/bootstrap_daemon/src/tox-bootstrapd.c | |||
@@ -312,7 +312,7 @@ int main(int argc, char *argv[]) | |||
312 | print_public_key(dht->self_public_key); | 312 | print_public_key(dht->self_public_key); |
313 | 313 | ||
314 | uint64_t last_LANdiscovery = 0; | 314 | uint64_t last_LANdiscovery = 0; |
315 | const uint16_t htons_port = htons(port); | 315 | const uint16_t net_htons_port = net_htons(port); |
316 | 316 | ||
317 | int waiting_for_dht_connection = 1; | 317 | int waiting_for_dht_connection = 1; |
318 | 318 | ||
@@ -325,7 +325,7 @@ int main(int argc, char *argv[]) | |||
325 | do_DHT(dht); | 325 | do_DHT(dht); |
326 | 326 | ||
327 | if (enable_lan_discovery && is_timeout(last_LANdiscovery, LAN_DISCOVERY_INTERVAL)) { | 327 | if (enable_lan_discovery && is_timeout(last_LANdiscovery, LAN_DISCOVERY_INTERVAL)) { |
328 | send_LANdiscovery(htons_port, dht); | 328 | send_LANdiscovery(net_htons_port, dht); |
329 | last_LANdiscovery = unix_time(); | 329 | last_LANdiscovery = unix_time(); |
330 | } | 330 | } |
331 | 331 | ||
diff --git a/other/bootstrap_node_packets.c b/other/bootstrap_node_packets.c index 09404d6e..614cb720 100644 --- a/other/bootstrap_node_packets.c +++ b/other/bootstrap_node_packets.c | |||
@@ -61,7 +61,7 @@ int bootstrap_set_callbacks(Networking_Core *net, uint32_t version, uint8_t *mot | |||
61 | return -1; | 61 | return -1; |
62 | } | 62 | } |
63 | 63 | ||
64 | bootstrap_version = htonl(version); | 64 | bootstrap_version = net_htonl(version); |
65 | memcpy(bootstrap_motd, motd, motd_length); | 65 | memcpy(bootstrap_motd, motd, motd_length); |
66 | bootstrap_motd_length = motd_length; | 66 | bootstrap_motd_length = motd_length; |
67 | 67 | ||