changeset 213:890a9b6379f0

Fix initialization order for gnutls
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 18 Feb 2010 14:50:11 +0900
parents c32f48b89cfb
children 5a1b93f59f8f
files freeDiameter/main.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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)  );
 	
"Welcome to our mercurial repository"