Commit da60501b authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

Fix initialization order for gnutls

parent 8144e4eb
......@@ -73,12 +73,6 @@ int main(int argc, char * argv[])
/* Name this thread */
fd_log_threadname("Main");
/* Initialize the config */
CHECK_FCT( fd_conf_init() );
/* Parse the command-line */
CHECK_FCT( main_cmdline(argc, argv) );
/* Initialize gcrypt and gnutls */
(void) gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
(void) gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
......@@ -91,6 +85,12 @@ int main(int argc, char * argv[])
TRACE_DEBUG(INFO, "GNUTLS library '%s' initialized.", gnutls_check_version(NULL));
}
/* Initialize the config */
CHECK_FCT( fd_conf_init() );
/* Parse the command-line */
CHECK_FCT( main_cmdline(argc, argv) );
/* Allow SIGINT and SIGTERM from this point */
CHECK_POSIX( pthread_create(&sig_th, NULL, sig_hdl, NULL) );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment