]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3: Don't break client connection count if client init fails.
authorTimo Sirainen <tss@iki.fi>
Tue, 6 Apr 2010 20:22:29 +0000 (23:22 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 6 Apr 2010 20:22:29 +0000 (23:22 +0300)
--HG--
branch : HEAD

src/pop3/pop3-client.c

index 580cd6558fa1513c3b6eff9be049906030ec5b69..ad9b7065bdd12080f25b4a8723a423b653467588 100644 (file)
@@ -203,6 +203,8 @@ struct client *client_create(int fd_in, int fd_out, struct mail_user *user,
        net_set_nonblock(fd_in, TRUE);
        net_set_nonblock(fd_out, TRUE);
 
+       pop3_client_count++;
+
        client = i_new(struct client, 1);
        client->service_user = service_user;
        client->set = set;
@@ -271,7 +273,6 @@ struct client *client_create(int fd_in, int fd_out, struct mail_user *user,
                client->anvil_sent = TRUE;
        }
 
-       pop3_client_count++;
        DLLIST_PREPEND(&pop3_clients, client);
        if (hook_client_created != NULL)
                hook_client_created(&client);