mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-03 12:16:44 +02:00
Thread nodeslist loading
This is necessary because DNS/http lookups block, and can do so for a very long time
This commit is contained in:
13
src/toxic.c
13
src/toxic.c
@ -1140,12 +1140,6 @@ int main(int argc, char **argv)
|
||||
queue_init_message("Name lookup server list does not contain any valid entries.");
|
||||
}
|
||||
|
||||
int nodeslist_ret = load_DHT_nodeslist();
|
||||
|
||||
if (nodeslist_ret != 0) {
|
||||
queue_init_message("DHT nodeslist failed to load (error %d)", nodeslist_ret);
|
||||
}
|
||||
|
||||
#ifdef X11
|
||||
if (init_xtra(DnD_callback) == -1)
|
||||
queue_init_message("X failed to initialize");
|
||||
@ -1173,7 +1167,6 @@ int main(int argc, char **argv)
|
||||
if (pthread_create(&cqueue_thread.tid, NULL, thread_cqueue, (void *) m) != 0)
|
||||
exit_toxic_err("failed in main", FATALERR_THREAD_CREATE);
|
||||
|
||||
|
||||
#ifdef AUDIO
|
||||
|
||||
av = init_audio(prompt, m);
|
||||
@ -1202,6 +1195,12 @@ int main(int argc, char **argv)
|
||||
if (init_mplex_away_timer(m) == -1)
|
||||
queue_init_message("Failed to init mplex auto-away.");
|
||||
|
||||
int nodeslist_ret = load_DHT_nodeslist();
|
||||
|
||||
if (nodeslist_ret != 0) {
|
||||
queue_init_message("DHT nodeslist failed to load (error %d)", nodeslist_ret);
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&Winthread.lock);
|
||||
print_init_messages(prompt);
|
||||
pthread_mutex_unlock(&Winthread.lock);
|
||||
|
Reference in New Issue
Block a user