annotate src/imap/cmd-x-cancel.c @ 9191:b340ecb24469 HEAD

Fix VPATH build of RQUOTA support. Some rpcgen derive #include "..." paths from the infile argument. This will be off for VPATH builds, as the generated rquota_xdr.c code will look in $(srcdir), but we'll generate the rquota.h file in $(builddir). Play safe and copy rquota.x to $(builddir) first. This fixes the build on openSUSE 11.1.
author Matthias Andree <matthias.andree@gmx.de>
date Tue, 07 Jul 2009 21:01:36 +0200
parents b9faf4db2a9f
children 00cd9aacd03c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8590
b9faf4db2a9f Updated copyright notices to include year 2009.
Timo Sirainen <tss@iki.fi>
parents: 7431
diff changeset
1 /* Copyright (c) 2006-2009 Dovecot authors, see the included COPYING file */
4943
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3 #include "common.h"
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4 #include "commands.h"
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6 bool cmd_x_cancel(struct client_command_context *cmd)
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
7 {
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
8 struct client_command_context *cancel_cmd;
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
9 const char *tag;
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
10
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
11 /* <tag> */
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
12 if (!client_read_string_args(cmd, 1, &tag))
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
13 return FALSE;
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
14
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
15 cancel_cmd = cmd->client->command_queue;
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
16 for (; cancel_cmd != NULL; cancel_cmd = cancel_cmd->next) {
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
17 if (cancel_cmd->tag != NULL && cancel_cmd != cmd &&
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
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
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
20 client_send_tagline(cmd, "OK Command cancelled.");
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
21 return TRUE;
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
22 }
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
23 }
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
24
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
25 client_send_tagline(cmd, "NO Command tag not found.");
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
26 return TRUE;
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
27 }
0caa14813235 Forgot to add
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
28