dovecot-2.0: dict proxy client: Don't crash in commit if there i...

dovecot at dovecot.org dovecot at dovecot.org
Tue May 4 17:57:47 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/7102daca9089
changeset: 11259:7102daca9089
user:      Timo Sirainen <tss at iki.fi>
date:      Tue May 04 16:11:52 2010 +0300
description:
dict proxy client: Don't crash in commit if there is no connection to server.

diffstat:

 src/lib-dict/dict-client.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r fa77ca53ad6c -r 7102daca9089 src/lib-dict/dict-client.c
--- a/src/lib-dict/dict-client.c	Tue May 04 13:57:26 2010 +0300
+++ b/src/lib-dict/dict-client.c	Tue May 04 16:11:52 2010 +0300
@@ -502,6 +502,9 @@
 	char *line;
 	int ret = 0;
 
+	if (!dict->handshaked)
+		return -1;
+
 	while (dict->async_commits > 0) {
 		if (client_dict_read_one_line(dict, &line) < 0) {
 			ret = -1;


More information about the dovecot-cvs mailing list