init_cryptopacket is now called by new_DHT.

This commit is contained in:
irungentoo 2013-08-22 13:19:38 -04:00
parent f249084772
commit 7719a9ed58
5 changed files with 1 additions and 4 deletions

View File

@ -1169,6 +1169,7 @@ DHT *new_DHT(Net_Crypto *c)
networking_registerhandler(c->lossless_udp->net, NET_PACKET_PING_RESPONSE, &handle_ping_response, temp);
networking_registerhandler(c->lossless_udp->net, NET_PACKET_GET_NODES, &handle_getnodes, temp);
networking_registerhandler(c->lossless_udp->net, NET_PACKET_SEND_NODES, &handle_sendnodes, temp);
init_cryptopackets(temp);
cryptopacket_registerhandler(c, CRYPTO_PACKET_NAT_PING, &handle_NATping, temp);
return temp;
}

View File

@ -660,7 +660,6 @@ Messenger *initMessenger(void)
friendreq_init(&(m->fr), m->net_crypto);
LANdiscovery_init(m->dht);
set_nospam(&(m->fr), random_int());
init_cryptopackets(m->dht);
return m;
}

View File

@ -86,7 +86,6 @@ int main(int argc, char *argv[])
IP ip;
ip.i = 0;
DHT *dht = new_DHT(new_net_crypto(new_networking(ip, PORT)));
init_cryptopackets(dht);
manage_keys(dht);
printf("Public key: ");
uint32_t i;

View File

@ -321,7 +321,6 @@ int main(int argc, char *argv[])
manage_keys(dht, server_conf.keys_file);
errno = tmperr;
init_cryptopackets(dht);
/* Public key */
int i;
printf("\nPublic Key: ");

View File

@ -136,7 +136,6 @@ int main(int argc, char *argv[])
ip.i = 0;
DHT *dht = new_DHT(new_net_crypto(new_networking(ip, PORT)));
init_cryptopackets(dht);
if (argc < 4) {
printf("usage %s ip port public_key\n", argv[0]);