diff options
author | iphydf <iphydf@users.noreply.github.com> | 2018-01-15 00:48:35 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2018-01-16 14:17:05 +0000 |
commit | 0b13936ce8498735e245531c222c035f41fd5e0f (patch) | |
tree | bafaef43863e822bbcb0c05192da0a973b3381a1 /other | |
parent | b3ec05543acdc0019b545de170720dc32d8f28d3 (diff) |
Use apidsl to generate LAN_discovery.h.
Diffstat (limited to 'other')
-rw-r--r-- | other/DHT_bootstrap.c | 4 | ||||
-rw-r--r-- | other/bootstrap_daemon/src/tox-bootstrapd.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c index 0e95805d..5eae46b9 100644 --- a/other/DHT_bootstrap.c +++ b/other/DHT_bootstrap.c | |||
@@ -181,7 +181,7 @@ int main(int argc, char *argv[]) | |||
181 | int is_waiting_for_dht_connection = 1; | 181 | int is_waiting_for_dht_connection = 1; |
182 | 182 | ||
183 | uint64_t last_LANdiscovery = 0; | 183 | uint64_t last_LANdiscovery = 0; |
184 | LANdiscovery_init(dht); | 184 | lan_discovery_init(dht); |
185 | 185 | ||
186 | while (1) { | 186 | while (1) { |
187 | if (is_waiting_for_dht_connection && DHT_isconnected(dht)) { | 187 | if (is_waiting_for_dht_connection && DHT_isconnected(dht)) { |
@@ -192,7 +192,7 @@ int main(int argc, char *argv[]) | |||
192 | do_DHT(dht); | 192 | do_DHT(dht); |
193 | 193 | ||
194 | if (is_timeout(last_LANdiscovery, is_waiting_for_dht_connection ? 5 : LAN_DISCOVERY_INTERVAL)) { | 194 | if (is_timeout(last_LANdiscovery, is_waiting_for_dht_connection ? 5 : LAN_DISCOVERY_INTERVAL)) { |
195 | send_LANdiscovery(net_htons(PORT), dht); | 195 | lan_discovery_send(net_htons(PORT), dht); |
196 | last_LANdiscovery = unix_time(); | 196 | last_LANdiscovery = unix_time(); |
197 | } | 197 | } |
198 | 198 | ||
diff --git a/other/bootstrap_daemon/src/tox-bootstrapd.c b/other/bootstrap_daemon/src/tox-bootstrapd.c index c3af4a10..c6780fa3 100644 --- a/other/bootstrap_daemon/src/tox-bootstrapd.c +++ b/other/bootstrap_daemon/src/tox-bootstrapd.c | |||
@@ -316,7 +316,7 @@ int main(int argc, char *argv[]) | |||
316 | int waiting_for_dht_connection = 1; | 316 | int waiting_for_dht_connection = 1; |
317 | 317 | ||
318 | if (enable_lan_discovery) { | 318 | if (enable_lan_discovery) { |
319 | LANdiscovery_init(dht); | 319 | lan_discovery_init(dht); |
320 | log_write(LOG_LEVEL_INFO, "Initialized LAN discovery successfully.\n"); | 320 | log_write(LOG_LEVEL_INFO, "Initialized LAN discovery successfully.\n"); |
321 | } | 321 | } |
322 | 322 | ||
@@ -324,7 +324,7 @@ int main(int argc, char *argv[]) | |||
324 | do_DHT(dht); | 324 | do_DHT(dht); |
325 | 325 | ||
326 | if (enable_lan_discovery && is_timeout(last_LANdiscovery, LAN_DISCOVERY_INTERVAL)) { | 326 | if (enable_lan_discovery && is_timeout(last_LANdiscovery, LAN_DISCOVERY_INTERVAL)) { |
327 | send_LANdiscovery(net_htons_port, dht); | 327 | lan_discovery_send(net_htons_port, dht); |
328 | last_LANdiscovery = unix_time(); | 328 | last_LANdiscovery = unix_time(); |
329 | } | 329 | } |
330 | 330 | ||