bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2008-2018 Dovecot authors, see the included COPYING file */
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainenstatic bool client_search_update_cancel(struct client *client, const char *tag)
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen update = client_search_update_lookup(client, tag, &idx);
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen array_delete(&client->search_updates, idx, 1);
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainenbool cmd_cancelupdate(struct client_command_context *cmd)
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen unsigned int i;
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen for (i = 0; args[i].type == IMAP_ARG_STRING; i++) ;
ce85eb246b9f2d1cd332c3da886bfbdb5392d3fcTimo Sirainen client_send_command_error(cmd, "Invalid parameters.");
c2fbbf7515aa419dc8b2d62a3c2bb0471d51a391Timo Sirainen if (!client_search_update_cancel(cmd->client, tag)) {
3dd0679b6f24be0287cc42d7a60bbf59cdf8b637Timo Sirainen client_send_tagline(cmd, "OK Updates cancelled.");