]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap-hibernate: Add imap_client_unhibernated event for errors
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 17 Aug 2020 11:03:53 +0000 (14:03 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 21 Aug 2020 08:51:13 +0000 (08:51 +0000)
Successful unhibernation is logged by imap process.

src/imap-hibernate/imap-client.c

index 2dd087e94a8630681da1c89b3ee7257342e7ee82..a3173571aca70e5636838eb79698ca8075cf4957 100644 (file)
@@ -113,8 +113,11 @@ static void
 imap_client_unhibernate_failed(struct imap_client **_client, const char *error)
 {
        struct imap_client *client = *_client;
-
-       e_error(client->event, IMAP_CLIENT_UNHIBERNATE_ERROR": %s", error);
+       struct event_passthrough *e =
+               event_create_passthrough(client->event)->
+               set_name("imap_client_unhibernated")->
+               add_str("error", error);
+       e_error(e->event(), IMAP_CLIENT_UNHIBERNATE_ERROR": %s", error);
        imap_client_destroy(_client, IMAP_CLIENT_UNHIBERNATE_ERROR);
 }