Skip to content

Commit

Permalink
fix: Allow port range in DHT_bootstrap.c.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Mar 8, 2022
1 parent d15d9fa commit 001aa63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion other/DHT_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 001aa63

Please sign in to comment.