diff options
author | Coren[m] <Break@Ocean> | 2013-09-12 16:07:51 +0200 |
---|---|---|
committer | Coren[m] <Break@Ocean> | 2013-09-12 16:07:51 +0200 |
commit | 0cfbe004ef30e5a601f965e625ab42a490e13e15 (patch) | |
tree | dc773d90afd7fe6b10fee118bab0e1085d7622fe /toxcore | |
parent | a74cfaea81fecb11a6f56e069d59b8ea68dd98a8 (diff) |
Messenger.c:
- remove local PORT definition in favor of TOX_PORT_DEFAULT
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/Messenger.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 166f9779..1b276602 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c | |||
@@ -639,13 +639,12 @@ int write_cryptpacket_id(Messenger *m, int friendnumber, uint8_t packet_id, uint | |||
639 | 639 | ||
640 | /* Interval in seconds between LAN discovery packet sending. */ | 640 | /* Interval in seconds between LAN discovery packet sending. */ |
641 | #define LAN_DISCOVERY_INTERVAL 60 | 641 | #define LAN_DISCOVERY_INTERVAL 60 |
642 | #define PORT 33445 | ||
643 | 642 | ||
644 | /* Send a LAN discovery packet every LAN_DISCOVERY_INTERVAL seconds. */ | 643 | /* Send a LAN discovery packet every LAN_DISCOVERY_INTERVAL seconds. */ |
645 | static void LANdiscovery(Messenger *m) | 644 | static void LANdiscovery(Messenger *m) |
646 | { | 645 | { |
647 | if (m->last_LANdiscovery + LAN_DISCOVERY_INTERVAL < unix_time()) { | 646 | if (m->last_LANdiscovery + LAN_DISCOVERY_INTERVAL < unix_time()) { |
648 | send_LANdiscovery(htons(PORT), m->net_crypto); | 647 | send_LANdiscovery(TOX_PORT_DEFAULT, m->net_crypto); |
649 | m->last_LANdiscovery = unix_time(); | 648 | m->last_LANdiscovery = unix_time(); |
650 | } | 649 | } |
651 | } | 650 | } |
@@ -660,7 +659,7 @@ Messenger *initMessenger(uint8_t ipv6enabled) | |||
660 | 659 | ||
661 | IP ip; | 660 | IP ip; |
662 | ip_init(&ip, ipv6enabled); | 661 | ip_init(&ip, ipv6enabled); |
663 | m->net = new_networking(ip, PORT); | 662 | m->net = new_networking(ip, TOX_PORT_DEFAULT); |
664 | 663 | ||
665 | if (m->net == NULL) { | 664 | if (m->net == NULL) { |
666 | free(m); | 665 | free(m); |