mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Use the messenger's dht instead of creating a new one
This commit is contained in:
parent
ffa01f8def
commit
6adbefab2b
|
@ -104,14 +104,10 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (argc > 3) {
|
||||
IP ip;
|
||||
ip.i = 0;
|
||||
|
||||
DHT * dht = new_DHT(new_net_crypto(new_networking(ip, PORT)));
|
||||
IP_Port bootstrap_ip_port;
|
||||
bootstrap_ip_port.port = htons(atoi(argv[2]));
|
||||
bootstrap_ip_port.ip.i = inet_addr(argv[1]);
|
||||
DHT_bootstrap(dht, bootstrap_ip_port, hex_string_to_bin(argv[3]));
|
||||
DHT_bootstrap(m->dht, bootstrap_ip_port, hex_string_to_bin(argv[3]));
|
||||
} else {
|
||||
FILE *file = fopen(argv[1], "rb");
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user