dovecot-1.0: Error handling fix

dovecot at dovecot.org dovecot at dovecot.org
Mon Oct 1 18:14:47 EEST 2007


details:   http://hg.dovecot.org/dovecot-1.0/rev/191b1cde3260
changeset: 5421:191b1cde3260
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Oct 01 18:14:43 2007 +0300
description:
Error handling fix

diffstat:

1 file changed, 6 insertions(+), 2 deletions(-)
src/lib-dict/dict-client.c |    8 ++++++--

diffs (18 lines):

diff -r 8d6433652a33 -r 191b1cde3260 src/lib-dict/dict-client.c
--- a/src/lib-dict/dict-client.c	Sun Sep 30 18:03:17 2007 +0300
+++ b/src/lib-dict/dict-client.c	Mon Oct 01 18:14:43 2007 +0300
@@ -197,8 +197,12 @@ static char *client_dict_read_line(struc
 		if (line != NULL)
 			return line;
 	}
-
-	i_error("read(%s) failed: %m", dict->path);
+	i_assert(ret < 0);
+
+	if (ret == -2)
+		i_error("read(%s) returned too much data", dict->path);
+	else
+		i_error("read(%s) failed: %m", dict->path);
 	return NULL;
 }
 


More information about the dovecot-cvs mailing list