mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
fix: Allow port range in DHT_bootstrap.c.
This commit is contained in:
parent
d15d9fa72d
commit
001aa63401
|
@ -143,7 +143,9 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
Mono_Time *mono_time = mono_time_new();
|
||||
DHT *dht = new_dht(logger, mono_time, new_networking_ex(logger, &ip, PORT, PORT, nullptr), true, true);
|
||||
const uint16_t start_port = PORT;
|
||||
const uint16_t end_port = start_port + (TOX_PORTRANGE_TO - TOX_PORTRANGE_FROM);
|
||||
DHT *dht = new_dht(logger, mono_time, new_networking_ex(logger, &ip, start_port, end_port, nullptr), true, true);
|
||||
Onion *onion = new_onion(logger, mono_time, dht);
|
||||
const Onion_Announce *onion_a = new_onion_announce(logger, mono_time, dht);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user