dovecot-2.0: director: Log an error if read() fails for notify fifo

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 14 17:15:03 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/8fed05799c00
changeset: 11819:8fed05799c00
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jul 14 15:15:00 2010 +0100
description:
director: Log an error if read() fails for notify fifo

diffstat:

 src/director/notify-connection.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 510b627687f8 -r 8fed05799c00 src/director/notify-connection.c
--- a/src/director/notify-connection.c	Wed Jul 14 15:14:26 2010 +0100
+++ b/src/director/notify-connection.c	Wed Jul 14 15:15:00 2010 +0100
@@ -32,8 +32,13 @@
 					     user);
 		}
 	}
-	if (conn->input->eof || conn->input->stream_errno != 0)
+	if (conn->input->eof) {
+		i_error("notify: read() unexpectedly returned EOF");
 		notify_connection_deinit(&conn);
+	} else if (conn->input->stream_errno != 0) {
+		i_error("notify: read() failed: %m");
+		notify_connection_deinit(&conn);
+	}
 }
 
 struct notify_connection *


More information about the dovecot-cvs mailing list