Procházet zdrojové kódy

Fix for early logging from Hans.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1073 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake před 19 roky
rodič
revize
bf6fb91a1c
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      exec/print.c

+ 3 - 3
exec/print.c

@@ -211,9 +211,6 @@ int log_setup (char **error_string, struct main_config *config)
 	int i;
 	static char error_string_response[512];
 
-	logmode = config->logmode;
-	logfile = config->logfile;
-
 	if (config->logmode & LOG_MODE_FILE) {
 		log_file_fp = fopen (config->logfile, "a+");
 		if (log_file_fp == 0) {
@@ -225,6 +222,9 @@ int log_setup (char **error_string, struct main_config *config)
 		}
 	}
 
+	logmode = config->logmode;
+	logfile = config->logfile;
+
 	if (config->logmode & LOG_MODE_SYSLOG) {
 		openlog("openais", LOG_CONS|LOG_PID, config->syslog_facility);
 	}