[dovecot-cvs] dovecot/src/lib failures.c,1.26,1.27

cras at dovecot.org cras at dovecot.org
Sun Oct 16 13:37:27 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv31142

Modified Files:
	failures.c 
Log Message:
Don't crash if reopening log file without separate info log file.



Index: failures.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/failures.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- failures.c	3 May 2005 17:02:42 -0000	1.26
+++ failures.c	16 Oct 2005 10:37:18 -0000	1.27
@@ -337,10 +337,11 @@
 	i_free(log_prefix);
 	log_prefix = i_strconcat(prefix, ": ", NULL);
 
-	open_log_file(&log_fd, path);
-
-	if (log_info_fd != NULL && log_info_fd != stderr)
+	if (log_info_fd != NULL && log_info_fd != log_fd &&
+	    log_info_fd != stderr)
 		(void)fclose(log_info_fd);
+
+	open_log_file(&log_fd, path);
 	log_info_fd = log_fd;
 
 	i_set_panic_handler(NULL);



More information about the dovecot-cvs mailing list