diff --git a/core/Messenger.c b/core/Messenger.c index 082b10d2..a7d21e1a 100644 --- a/core/Messenger.c +++ b/core/Messenger.c @@ -517,6 +517,11 @@ int initMessenger(void) if(init_networking(ip,PORT) == -1) return -1; + DHT_init(); + LosslessUDP_init(); + friendreq_init(); + LANdiscovery_init(); + return 0; } @@ -684,7 +689,7 @@ static void LANdiscovery(void) void doMessenger(void) { networking_poll(); - + doDHT(); doLossless_UDP(); doNetCrypto(); @@ -693,14 +698,6 @@ void doMessenger(void) LANdiscovery(); } -void Messenger_init(void) -{ - DHT_init(); - LosslessUDP_init(); - friendreq_init(); - LANdiscovery_init(); -} - /* returns the size of the messenger data (for saving) */ uint32_t Messenger_size(void) {