Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/imap/cmd-x-cancel.c @ 9658:8ba4253adc9b HEAD tip
*-login: SSL connections didn't get closed when the client got destroyed.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 08 May 2014 16:41:29 +0300 |
parents | 00cd9aacd03c |
children |
rev | line source |
---|---|
9532
00cd9aacd03c
Updated copyright notices to include year 2010.
Timo Sirainen <tss@iki.fi>
parents:
8590
diff
changeset
|
1 /* Copyright (c) 2006-2010 Dovecot authors, see the included COPYING file */ |
4943 | 2 |
3 #include "common.h" | |
4 #include "commands.h" | |
5 | |
6 bool cmd_x_cancel(struct client_command_context *cmd) | |
7 { | |
8 struct client_command_context *cancel_cmd; | |
9 const char *tag; | |
10 | |
11 /* <tag> */ | |
12 if (!client_read_string_args(cmd, 1, &tag)) | |
13 return FALSE; | |
14 | |
15 cancel_cmd = cmd->client->command_queue; | |
16 for (; cancel_cmd != NULL; cancel_cmd = cancel_cmd->next) { | |
17 if (cancel_cmd->tag != NULL && cancel_cmd != cmd && | |
18 strcmp(cancel_cmd->tag, tag) == 0) { | |
7431
33d8adcc2d44
client_command_free()/cancel(): Take pointer-to-pointer parameter and set it
Timo Sirainen <tss@iki.fi>
parents:
7086
diff
changeset
|
19 client_command_cancel(&cancel_cmd); |
4943 | 20 client_send_tagline(cmd, "OK Command cancelled."); |
21 return TRUE; | |
22 } | |
23 } | |
24 | |
25 client_send_tagline(cmd, "NO Command tag not found."); | |
26 return TRUE; | |
27 } | |
28 |