summaryrefslogtreecommitdiff
path: root/toxcore/Messenger.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/Messenger.c')
-rw-r--r--toxcore/Messenger.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c
index fd17ab98..a7e0a9fe 100644
--- a/toxcore/Messenger.c
+++ b/toxcore/Messenger.c
@@ -1765,15 +1765,6 @@ static int friend_already_added(const uint8_t *real_pk, void *data)
1765 return -1; 1765 return -1;
1766} 1766}
1767 1767
1768/* Send a LAN discovery packet every LAN_DISCOVERY_INTERVAL seconds. */
1769static void LANdiscovery(Messenger *m)
1770{
1771 if (m->last_LANdiscovery + LAN_DISCOVERY_INTERVAL < unix_time()) {
1772 send_LANdiscovery(htons(TOX_PORT_DEFAULT), m->dht);
1773 m->last_LANdiscovery = unix_time();
1774 }
1775}
1776
1777/* Run this at startup. */ 1768/* Run this at startup. */
1778Messenger *new_messenger(Messenger_Options *options, unsigned int *error) 1769Messenger *new_messenger(Messenger_Options *options, unsigned int *error)
1779{ 1770{
@@ -1842,7 +1833,6 @@ Messenger *new_messenger(Messenger_Options *options, unsigned int *error)
1842 1833
1843 m->options = *options; 1834 m->options = *options;
1844 friendreq_init(&(m->fr), m->fr_c); 1835 friendreq_init(&(m->fr), m->fr_c);
1845 LANdiscovery_init(m->dht);
1846 set_nospam(&(m->fr), random_int()); 1836 set_nospam(&(m->fr), random_int());
1847 set_filter_function(&(m->fr), &friend_already_added, m); 1837 set_filter_function(&(m->fr), &friend_already_added, m);
1848 1838
@@ -2308,7 +2298,6 @@ void do_messenger(Messenger *m)
2308 do_onion_client(m->onion_c); 2298 do_onion_client(m->onion_c);
2309 do_friend_connections(m->fr_c); 2299 do_friend_connections(m->fr_c);
2310 do_friends(m); 2300 do_friends(m);
2311 LANdiscovery(m);
2312 connection_status_cb(m); 2301 connection_status_cb(m);
2313 2302
2314#ifdef LOGGING 2303#ifdef LOGGING