~ubuntu-branches/ubuntu/wily/dovecot/wily

« back to all changes in this revision

Viewing changes to src/imap/cmd-cancelupdate.c

  • Committer: Package Import Robot
  • Author(s): Jaldhar H. Vyas
  • Date: 2013-09-09 00:57:32 UTC
  • mfrom: (1.13.11)
  • mto: (4.8.5 experimental) (1.16.1)
  • mto: This revision was merged to the branch mainline in revision 97.
  • Revision ID: package-import@ubuntu.com-20130909005732-dn1eell8srqbhh0e
Tags: upstream-2.2.5
ImportĀ upstreamĀ versionĀ 2.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2008-2012 Dovecot authors, see the included COPYING file */
 
1
/* Copyright (c) 2008-2013 Dovecot authors, see the included COPYING file */
2
2
 
3
3
#include "imap-common.h"
 
4
#include "imap-search.h"
4
5
#include "imap-commands.h"
5
6
 
6
7
static bool client_search_update_cancel(struct client *client, const char *tag)
12
13
        if (update == NULL)
13
14
                return FALSE;
14
15
 
15
 
        i_free(update->tag);
16
 
        mailbox_search_result_free(&update->result);
 
16
        imap_search_update_free(update);
17
17
        array_delete(&client->search_updates, idx, 1);
18
18
        return TRUE;
19
19
}
29
29
 
30
30
        for (i = 0; args[i].type == IMAP_ARG_STRING; i++) ;
31
31
        if (!IMAP_ARG_IS_EOL(&args[i]) || i == 0) {
32
 
                client_send_tagline(cmd, "BAD Invalid parameters.");
 
32
                client_send_command_error(cmd, "Invalid parameters.");
33
33
                return TRUE;
34
34
        }
35
35
 
36
36
        while (imap_arg_get_quoted(args, &tag)) {
37
37
                if (!client_search_update_cancel(cmd->client, tag)) {
38
 
                        client_send_tagline(cmd, "BAD Unknown tag.");
 
38
                        client_send_tagline(cmd, "NO Unknown tag.");
39
39
                        return TRUE;
40
40
                }
41
41
                args++;