Use the messenger's dht instead of creating a new one

This commit is contained in:
Simon Levermann 2013-08-20 23:08:14 +02:00
parent ffa01f8def
commit 6adbefab2b

View File

@ -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");