changeset 312:c2f839305f23

Fix bug when waaad is compiled with default debug messages
author Sebastien Decugis <sdecugis@nict.go.jp>
date Wed, 25 Feb 2009 10:46:59 +0900
parents 388733c747d4
children 082d8f33f645
files waaad/log.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/waaad/log.c	Mon Jan 19 11:04:05 2009 +0900
+++ b/waaad/log.c	Wed Feb 25 10:46:59 2009 +0900
@@ -62,7 +62,7 @@
 static int log_init_syslog( void )
 {
 	/* open the log */
-	openlog(PACKAGE_NAME, LOG_ODELAY, 0);
+	openlog(PROJECT_NAME, LOG_ODELAY, 0);
 	
 	/* Return */
 	return 0;
@@ -187,11 +187,12 @@
 	
 	ret = 0;
 	
-	TRACE_DEBUG(FULL, "Log facility initialized");
-	
 error:
 	/* Unlock the mutex and return ret */
 	(void) pthread_mutex_unlock(&log_mtx);
+	if (ret == 0) {
+		TRACE_DEBUG(FULL, "Log facility initialized");
+	}
 	return ret;
 }
 		
"Welcome to our mercurial repository"