Sfoglia il codice sorgente

Fix for early logging from Hans.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1073 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 19 anni fa
parent
commit
bf6fb91a1c
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  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;
 	int i;
 	static char error_string_response[512];
 	static char error_string_response[512];
 
 
-	logmode = config->logmode;
-	logfile = config->logfile;
-
 	if (config->logmode & LOG_MODE_FILE) {
 	if (config->logmode & LOG_MODE_FILE) {
 		log_file_fp = fopen (config->logfile, "a+");
 		log_file_fp = fopen (config->logfile, "a+");
 		if (log_file_fp == 0) {
 		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) {
 	if (config->logmode & LOG_MODE_SYSLOG) {
 		openlog("openais", LOG_CONS|LOG_PID, config->syslog_facility);
 		openlog("openais", LOG_CONS|LOG_PID, config->syslog_facility);
 	}
 	}