Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8846:d6ef39b9e4cf HEAD
IMAP: ESORT extension was implemented wrong.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 20 Mar 2009 12:28:37 -0400 |
parents | 78586322a1d2 |
children | 43a49b3d3b5e |
files | src/imap/cmd-sort.c |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-sort.c Thu Mar 19 20:34:58 2009 -0400 +++ b/src/imap/cmd-sort.c Fri Mar 20 12:28:37 2009 -0400 @@ -102,6 +102,14 @@ if (!client_verify_open_mailbox(cmd)) return TRUE; + ctx = p_new(cmd->pool, struct imap_search_context, 1); + ctx->cmd = cmd; + + if ((ret = cmd_search_parse_return_if_found(ctx, &args)) <= 0) { + /* error / waiting for unambiguity */ + return ret < 0; + } + /* sort program */ if (args->type != IMAP_ARG_LIST) { client_send_command_error(cmd, "Invalid sort argument."); @@ -121,14 +129,6 @@ charset = IMAP_ARG_STR(args); args++; - ctx = p_new(cmd->pool, struct imap_search_context, 1); - ctx->cmd = cmd; - - if ((ret = cmd_search_parse_return_if_found(ctx, &args)) <= 0) { - /* error / waiting for unambiguity */ - return ret < 0; - } - ret = imap_search_args_build(cmd, args, charset, &sargs); if (ret <= 0) return ret < 0;