[dovecot-cvs] dovecot/src/imap cmd-sort.c, 1.14, 1.15 cmd-thread.c, 1.6, 1.7 imap-sort.c, 1.10, 1.11 imap-thread.c, 1.8, 1.9

cras at procontrol.fi cras at procontrol.fi
Mon May 17 02:11:19 EEST 2004


Update of /home/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv1851

Modified Files:
	cmd-sort.c cmd-thread.c imap-sort.c imap-thread.c 
Log Message:
return value fixes



Index: cmd-sort.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-sort.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- cmd-sort.c	27 Apr 2004 20:25:52 -0000	1.14
+++ cmd-sort.c	16 May 2004 23:11:17 -0000	1.15
@@ -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);

Index: cmd-thread.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-thread.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cmd-thread.c	27 Apr 2004 20:25:52 -0000	1.6
+++ cmd-thread.c	16 May 2004 23:11:17 -0000	1.7
@@ -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);

Index: imap-sort.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-sort.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- imap-sort.c	27 Apr 2004 20:25:52 -0000	1.10
+++ imap-sort.c	16 May 2004 23:11:17 -0000	1.11
@@ -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));

Index: imap-thread.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/imap-thread.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- imap-thread.c	27 Apr 2004 20:25:52 -0000	1.8
+++ imap-thread.c	16 May 2004 23:11:17 -0000	1.9
@@ -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)



More information about the dovecot-cvs mailing list