]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: cmd-idle: Created local variable for client in idle_add_keepalive_timeout().
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sat, 9 Dec 2017 00:11:53 +0000 (01:11 +0100)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 11 Dec 2017 13:44:18 +0000 (15:44 +0200)
src/imap/cmd-idle.c

index d7aba8e09d46d2425d62fef680e71409d4d7f904..5f6f702d4253821229a7976c8a028538a78667ee 100644 (file)
@@ -162,13 +162,14 @@ static void idle_callback(struct mailbox *box, struct cmd_idle_context *ctx)
 
 static void idle_add_keepalive_timeout(struct cmd_idle_context *ctx)
 {
-       unsigned int interval = ctx->client->set->imap_idle_notify_interval;
+       struct client *client = ctx->client;
+       unsigned int interval = client->set->imap_idle_notify_interval;
 
        if (interval == 0)
                return;
 
-       interval = imap_keepalive_interval_msecs(ctx->client->user->username,
-                                                ctx->client->user->remote_ip,
+       interval = imap_keepalive_interval_msecs(client->user->username,
+                                                client->user->remote_ip,
                                                 interval);
 
        timeout_remove(&ctx->keepalive_to);