]> 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)
committerGitLab <gitlab@git.dovecot.net>
Thu, 16 Mar 2017 07:07:45 +0000 (09:07 +0200)
src/pop3/pop3-client.c
src/pop3/pop3-client.h

index 52c4eeea4ce34eaf586631f605287e24844962f6..8c4b695935a59fef53fbf4f91a8069ba4695abd4 100644 (file)
@@ -571,6 +571,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 ed4a115771a3c654738cfdc59ac8544061831731..db3b2110f02cd631f36d043aef4e3f966b154320 100644 (file)
@@ -96,6 +96,7 @@ struct client {
        /* Module-specific contexts. */
        ARRAY(union pop3_module_context *) module_contexts;
 
+       bool destroyed:1;
        bool disconnected:1;
        bool deleted:1;
        bool waiting_input:1;