[dovecot-cvs] dovecot/src/imap cmd-x-cancel.c,NONE,1.1
tss at dovecot.org
tss at dovecot.org
Thu Dec 21 10:20:44 UTC 2006
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv19719
Added Files:
cmd-x-cancel.c
Log Message:
Forgot to add
--- NEW FILE: cmd-x-cancel.c ---
/* Copyright (C) 2006 Timo Sirainen */
#include "common.h"
#include "commands.h"
bool cmd_x_cancel(struct client_command_context *cmd)
{
struct client_command_context *cancel_cmd;
const char *tag;
/* <tag> */
if (!client_read_string_args(cmd, 1, &tag))
return FALSE;
cancel_cmd = cmd->client->command_queue;
for (; cancel_cmd != NULL; cancel_cmd = cancel_cmd->next) {
if (cancel_cmd->tag != NULL && cancel_cmd != cmd &&
strcmp(cancel_cmd->tag, tag) == 0) {
client_command_cancel(cancel_cmd);
client_send_tagline(cmd, "OK Command cancelled.");
return TRUE;
}
}
client_send_tagline(cmd, "NO Command tag not found.");
return TRUE;
}
More information about the dovecot-cvs
mailing list