]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Fix crash if imap-hibernate socket can't be connected to
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 24 Aug 2020 13:58:16 +0000 (16:58 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 6 Nov 2020 15:08:05 +0000 (17:08 +0200)
The error was supposed to be returned to caller, not logged directly.

src/imap/imap-client-hibernate.c

index 64b43bee43e5e563d73cb731027dcbb21ed97c0a..a68ac3cdbde5c012e960d215732afebdafd2c9ce 100644 (file)
@@ -176,7 +176,8 @@ imap_hibernate_process_send(struct client *client, const buffer_t *state,
                           "/"IMAP_HIBERNATE_SOCKET_NAME, NULL);
        fd = net_connect_unix_with_retries(path, 1000);
        if (fd == -1) {
-               e_error(client->event, "net_connect_unix(%s) failed: %m", path);
+               *error_r = t_strdup_printf(
+                       "net_connect_unix(%s) failed: %m", path);
                return -1;
        }
        net_set_nonblock(fd, FALSE);