]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Add imap_client.logged_out at LOGOUT
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 16 Feb 2017 18:17:32 +0000 (20:17 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 19 Feb 2017 00:40:19 +0000 (02:40 +0200)
This is useful for determining if client did a clean logout

src/imap/cmd-logout.c
src/imap/imap-client.h

index 39c88f02643e49b0899ba972f8c2ba064cc2c768..9c7f1aa1bbf7a4929f9a7be2f8bf25b02d04db8c 100644 (file)
@@ -8,6 +8,7 @@ bool cmd_logout(struct client_command_context *cmd)
 {
        struct client *client = cmd->client;
 
+       client->logged_out = TRUE;
        client_send_line(client, "* BYE Logging out");
 
        if (client->mailbox != NULL) {
index f58c1beaa6b7996e1eab17817a695f7c8129e376..78468e9c91453192de3e5ef01859005740c3abc0 100644 (file)
@@ -191,6 +191,7 @@ struct client {
        /* syncing marks this TRUE when it sees \Deleted flags. this is by
           EXPUNGE for Outlook-workaround. */
        unsigned int sync_seen_deletes:1;
+       unsigned int logged_out:1;
        unsigned int disconnected:1;
        unsigned int destroyed:1;
        unsigned int handling_input:1;