From: Timo Sirainen Date: Thu, 29 May 2008 16:08:05 +0000 (+0300) Subject: If SORT/THREAD has invalid search parameters, return BAD instead of NO. X-Git-Tag: 1.1.rc6~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1336451861a82cdbee3f30e48d206fea87e5762c;p=thirdparty%2Fdovecot%2Fcore.git If SORT/THREAD has invalid search parameters, return BAD instead of NO. --HG-- branch : HEAD --- diff --git a/src/imap/cmd-sort.c b/src/imap/cmd-sort.c index 820af5bd40..0ca6a7e51d 100644 --- a/src/imap/cmd-sort.c +++ b/src/imap/cmd-sort.c @@ -130,7 +130,7 @@ bool cmd_sort(struct client_command_context *cmd) sargs = imap_search_args_build(pool, client->mailbox, args, &error); if (sargs == NULL) { /* error in search arguments */ - client_send_tagline(cmd, t_strconcat("NO ", error, NULL)); + client_send_tagline(cmd, t_strconcat("BAD ", error, NULL)); } else if (imap_sort(cmd, charset, sargs, sorting) == 0) { pool_unref(&pool); return cmd_sync(cmd, MAILBOX_SYNC_FLAG_FAST | diff --git a/src/imap/cmd-thread.c b/src/imap/cmd-thread.c index 32395e6e98..9e6bca1f0e 100644 --- a/src/imap/cmd-thread.c +++ b/src/imap/cmd-thread.c @@ -63,7 +63,7 @@ bool cmd_thread(struct client_command_context *cmd) sargs = imap_search_args_build(pool, client->mailbox, args, &error); if (sargs == NULL) { /* error in search arguments */ - client_send_tagline(cmd, t_strconcat("NO ", error, NULL)); + client_send_tagline(cmd, t_strconcat("BAD ", error, NULL)); } else if (imap_thread(cmd, charset, sargs, threading) == 0) { pool_unref(&pool); return cmd_sync(cmd, MAILBOX_SYNC_FLAG_FAST |