# HG changeset patch # User Sebastien Decugis # Date 1266472211 -32400 # Node ID 890a9b6379f05e9922a9719748b266dce47cbf8a # Parent c32f48b89cfb3dbcfa54c8663274e125e5514037 Fix initialization order for gnutls diff -r c32f48b89cfb -r 890a9b6379f0 freeDiameter/main.c --- a/freeDiameter/main.c Thu Feb 18 14:19:05 2010 +0900 +++ b/freeDiameter/main.c Thu Feb 18 14:50:11 2010 +0900 @@ -73,12 +73,6 @@ /* 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 @@ 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) );