summaryrefslogtreecommitdiff
path: root/other
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-10-28 16:01:29 -0400
committerirungentoo <irungentoo@gmail.com>2013-10-28 16:01:29 -0400
commit415835ce3d2daa9ecd4100e76d58d93b3afa2db0 (patch)
tree755d041ea06a9b1c05fc72687c9dd5c6e98bbe73 /other
parent988922bdeb94dd83e61ed387b29187ac4c9936e0 (diff)
parent2bdce934373d238778bc77a04198bd3f1481542f (diff)
Merge branch 'master' into harden
Also removed some old, useless loading code.
Diffstat (limited to 'other')
-rw-r--r--other/DHT_bootstrap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/other/DHT_bootstrap.c b/other/DHT_bootstrap.c
index 4a5d937d..af5fae01 100644
--- a/other/DHT_bootstrap.c
+++ b/other/DHT_bootstrap.c
@@ -1,3 +1,4 @@
1
1/* DHT boostrap 2/* DHT boostrap
2 * 3 *
3 * A simple DHT boostrap server for tox. 4 * A simple DHT boostrap server for tox.
@@ -20,6 +21,7 @@
20 * along with Tox. If not, see <http://www.gnu.org/licenses/>. 21 * along with Tox. If not, see <http://www.gnu.org/licenses/>.
21 * 22 *
22 */ 23 */
24
23#ifdef HAVE_CONFIG_H 25#ifdef HAVE_CONFIG_H
24#include "config.h" 26#include "config.h"
25#endif 27#endif
@@ -27,6 +29,8 @@
27#include "../toxcore/DHT.h" 29#include "../toxcore/DHT.h"
28#include "../toxcore/LAN_discovery.h" 30#include "../toxcore/LAN_discovery.h"
29#include "../toxcore/friend_requests.h" 31#include "../toxcore/friend_requests.h"
32#include "../toxcore/util.h"
33
30#include "../testing/misc_tools.c" 34#include "../testing/misc_tools.c"
31 35
32/* Sleep function (x = milliseconds) */ 36/* Sleep function (x = milliseconds) */
@@ -147,7 +151,7 @@ int main(int argc, char *argv[])
147 151
148 do_DHT(dht); 152 do_DHT(dht);
149 153
150 if (last_LANdiscovery + (is_waiting_for_dht_connection ? 5 : LAN_DISCOVERY_INTERVAL) < unix_time()) { 154 if (is_timeout(last_LANdiscovery, is_waiting_for_dht_connection ? 5 : LAN_DISCOVERY_INTERVAL)) {
151 send_LANdiscovery(htons(PORT), dht->c); 155 send_LANdiscovery(htons(PORT), dht->c);
152 last_LANdiscovery = unix_time(); 156 last_LANdiscovery = unix_time();
153 } 157 }