mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Messenger.c:
- remove local PORT definition in favor of TOX_PORT_DEFAULT
This commit is contained in:
parent
a74cfaea81
commit
0cfbe004ef
|
@ -639,13 +639,12 @@ int write_cryptpacket_id(Messenger *m, int friendnumber, uint8_t packet_id, uint
|
||||||
|
|
||||||
/* Interval in seconds between LAN discovery packet sending. */
|
/* Interval in seconds between LAN discovery packet sending. */
|
||||||
#define LAN_DISCOVERY_INTERVAL 60
|
#define LAN_DISCOVERY_INTERVAL 60
|
||||||
#define PORT 33445
|
|
||||||
|
|
||||||
/* Send a LAN discovery packet every LAN_DISCOVERY_INTERVAL seconds. */
|
/* Send a LAN discovery packet every LAN_DISCOVERY_INTERVAL seconds. */
|
||||||
static void LANdiscovery(Messenger *m)
|
static void LANdiscovery(Messenger *m)
|
||||||
{
|
{
|
||||||
if (m->last_LANdiscovery + LAN_DISCOVERY_INTERVAL < unix_time()) {
|
if (m->last_LANdiscovery + LAN_DISCOVERY_INTERVAL < unix_time()) {
|
||||||
send_LANdiscovery(htons(PORT), m->net_crypto);
|
send_LANdiscovery(TOX_PORT_DEFAULT, m->net_crypto);
|
||||||
m->last_LANdiscovery = unix_time();
|
m->last_LANdiscovery = unix_time();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -660,7 +659,7 @@ Messenger *initMessenger(uint8_t ipv6enabled)
|
||||||
|
|
||||||
IP ip;
|
IP ip;
|
||||||
ip_init(&ip, ipv6enabled);
|
ip_init(&ip, ipv6enabled);
|
||||||
m->net = new_networking(ip, PORT);
|
m->net = new_networking(ip, TOX_PORT_DEFAULT);
|
||||||
|
|
||||||
if (m->net == NULL) {
|
if (m->net == NULL) {
|
||||||
free(m);
|
free(m);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user