]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3: Add client.destroyed boolean
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 8 Mar 2017 22:09:12 +0000 (17:09 -0500)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 16 Mar 2017 17:48:17 +0000 (19:48 +0200)
src/pop3/pop3-client.c
src/pop3/pop3-client.h

index 360824bc9d06b6e653f9b730467b85235ed2044f..0036122b4c9d11f5ecd55ca99f97880981c2ef8e 100644 (file)
@@ -583,6 +583,10 @@ void client_destroy(struct client *client, const char *reason)
 
 static void client_default_destroy(struct client *client, const char *reason)
 {
+       i_assert(!client->destroyed);
+
+       client->destroyed = TRUE;
+
        if (client->seen_change_count > 0)
                (void)client_update_mails(client);
 
index e135316c33f0ac0aa6dde4329e6c0bc28fe88606..10e34b8d4251175ab7fdfb4a228c6fe20a807127 100644 (file)
@@ -96,6 +96,7 @@ struct client {
        /* Module-specific contexts. */
        ARRAY(union pop3_module_context *) module_contexts;
 
+       unsigned int destroyed:1;
        unsigned int disconnected:1;
        unsigned int deleted:1;
        unsigned int waiting_input:1;