Mercurial > dovecot > original-hg > dovecot-1.2
view src/imap/cmd-x-cancel.c @ 8590:b9faf4db2a9f HEAD
Updated copyright notices to include year 2009.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 06 Jan 2009 09:25:38 -0500 |
parents | 33d8adcc2d44 |
children | 00cd9aacd03c |
line wrap: on
line source
/* Copyright (c) 2006-2009 Dovecot authors, see the included COPYING file */ #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; }