From 1336451861a82cdbee3f30e48d206fea87e5762c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 29 May 2008 19:08:05 +0300 Subject: [PATCH] If SORT/THREAD has invalid search parameters, return BAD instead of NO. --HG-- branch : HEAD --- src/imap/cmd-sort.c | 2 +- src/imap/cmd-thread.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 | -- 2.47.3