Jelajahi Sumber

Fix logsys write to file crash.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1727 fd59a12c-fef9-0310-b244-a6a79926bd2f
Fabio M. Di Nitto 17 tahun lalu
induk
melakukan
b2836a0fd4
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      exec/logsys.c

+ 2 - 2
exec/logsys.c

@@ -1,6 +1,6 @@
 /*
 /*
  * Copyright (c) 2002-2004 MontaVista Software, Inc.
  * Copyright (c) 2002-2004 MontaVista Software, Inc.
- * Copyright (c) 2006-2008 Red Hat, Inc.
+ * Copyright (c) 2006-2009 Red Hat, Inc.
  *
  *
  * Author: Steven Dake (sdake@redhat.com)
  * Author: Steven Dake (sdake@redhat.com)
  * Author: Lon Hohberger (lhh@redhat.com)
  * Author: Lon Hohberger (lhh@redhat.com)
@@ -338,7 +338,7 @@ static void log_printf_to_logs (
 	/*
 	/*
 	 * Output to configured file
 	 * Output to configured file
 	 */	
 	 */	
-	if (logsys_mode & LOG_MODE_OUTPUT_FILE) {
+	if ((logsys_mode & LOG_MODE_OUTPUT_FILE) && logsys_file_fp) {
 		/*
 		/*
 		 * Output to a file
 		 * Output to a file
 		 */
 		 */