]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict proxy client: Don't crash in commit if there is no connection to server.
authorTimo Sirainen <tss@iki.fi>
Tue, 4 May 2010 13:11:52 +0000 (16:11 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 4 May 2010 13:11:52 +0000 (16:11 +0300)
--HG--
branch : HEAD

src/lib-dict/dict-client.c

index d6700e342f3e98538f75c365e61b0ca077cda7e6..3d5add7a859ed97fbd66611f1a00900a7ecc589c 100644 (file)
@@ -502,6 +502,9 @@ static int client_dict_wait(struct dict *_dict)
        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;