Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2023:1659cfc67eaf HEAD
return value fixes
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 17 May 2004 02:11:17 +0300 |
parents | f5eb6bd7d1aa |
children | 8bb1db13c94a |
files | src/imap/cmd-sort.c src/imap/cmd-thread.c src/imap/imap-sort.c src/imap/imap-thread.c |
diffstat | 4 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-sort.c Mon May 17 02:06:34 2004 +0300 +++ b/src/imap/cmd-sort.c Mon May 17 02:11:17 2004 +0300 @@ -120,7 +120,7 @@ if (sargs == NULL) { /* error in search arguments */ client_send_tagline(client, t_strconcat("NO ", error, NULL)); - } else if (imap_sort(client, charset, sargs, sorting)) { + } else if (imap_sort(client, charset, sargs, sorting) == 0) { /* NOTE: syncing is allowed when returning UIDs */ if (client->cmd_uid) client_sync_full_fast(client);
--- a/src/imap/cmd-thread.c Mon May 17 02:06:34 2004 +0300 +++ b/src/imap/cmd-thread.c Mon May 17 02:11:17 2004 +0300 @@ -62,7 +62,7 @@ if (sargs == NULL) { /* error in search arguments */ client_send_tagline(client, t_strconcat("NO ", error, NULL)); - } else if (imap_thread(client, charset, sargs, threading)) { + } else if (imap_thread(client, charset, sargs, threading) == 0) { /* NOTE: syncing is allowed when returning UIDs */ if (client->cmd_uid) client_sync_full_fast(client);
--- a/src/imap/imap-sort.c Mon May 17 02:06:34 2004 +0300 +++ b/src/imap/imap-sort.c Mon May 17 02:11:17 2004 +0300 @@ -211,7 +211,7 @@ /* remove the common part from sort program, we already know input is sorted that much so we don't have to worry about it. */ if (mailbox_search_get_sorting(client->mailbox, norm_prog) < 0) - return FALSE; + return -1; ctx->common_mask = mail_sort_get_common_mask(ctx->sort_program, norm_prog, &count); if (count > 0) { @@ -230,7 +230,7 @@ wanted_fields, wanted_headers); if (ctx->search_ctx == NULL) { mailbox_transaction_rollback(ctx->t); - return FALSE; + return -1; } ctx->box = client->mailbox; @@ -252,7 +252,7 @@ mailbox_transaction_rollback(ctx->t); - if (ctx->written || ret) { + if (ctx->written || ret == 0) { str_append(ctx->str, "\r\n"); o_stream_send(client->output, str_data(ctx->str), str_len(ctx->str));
--- a/src/imap/imap-thread.c Mon May 17 02:06:34 2004 +0300 +++ b/src/imap/imap-thread.c Mon May 17 02:11:17 2004 +0300 @@ -123,7 +123,7 @@ MAIL_FETCH_DATE, wanted_headers); if (ctx->search_ctx == NULL) { mailbox_transaction_rollback(ctx->t); - return FALSE; + return -1; } ctx->box = client->mailbox; @@ -149,7 +149,7 @@ ret = mailbox_search_deinit(ctx->search_ctx); mailbox_transaction_rollback(ctx->t); mail_thread_deinit(ctx); - return ret == 0; + return ret; } static void add_root(struct thread_context *ctx, struct node *node)