diff src/imap/imap-fetch.c @ 991:21788a1e9e39 HEAD

Partial fetches are working fast again - faster than ever actually.
author Timo Sirainen <tss@iki.fi>
date Tue, 21 Jan 2003 07:37:35 +0200
parents 8028c4dcf38f
children ab4091b2ddc2
line wrap: on
line diff
--- a/src/imap/imap-fetch.c	Tue Jan 21 07:36:32 2003 +0200
+++ b/src/imap/imap-fetch.c	Tue Jan 21 07:37:35 2003 +0200
@@ -112,7 +112,8 @@
 	if (o_stream_send_str(ctx->output, str) < 0)
 		return FALSE;
 
-	return message_send(ctx->output, stream, &body_size, 0, (uoff_t)-1);
+	return message_send(ctx->output, stream, &body_size,
+			    0, (uoff_t)-1) >= 0;
 }
 
 static int fetch_send_rfc822_header(struct imap_fetch_context *ctx,
@@ -134,7 +135,7 @@
 	if (o_stream_send_str(ctx->output, str) < 0)
 		return FALSE;
 
-	return message_send(ctx->output, stream, &hdr_size, 0, (uoff_t)-1);
+	return message_send(ctx->output, stream, &hdr_size, 0, (uoff_t)-1) >= 0;
 }
 
 static int fetch_send_rfc822_text(struct imap_fetch_context *ctx,
@@ -157,7 +158,8 @@
 		return FALSE;
 
 	i_stream_seek(stream, hdr_size.physical_size);
-	return message_send(ctx->output, stream, &body_size, 0, (uoff_t)-1);
+	return message_send(ctx->output, stream, &body_size,
+			    0, (uoff_t)-1) >= 0;
 }
 
 static int fetch_mail(struct imap_fetch_context *ctx, struct mail *mail)
@@ -258,6 +260,7 @@
 	ctx.imap_data = imap_data;
 	ctx.bodies = bodies;
 	ctx.output = client->output;
+	ctx.select_counter = client->select_counter;
 	ctx.str = t_str_new(8192);
 
 	ctx.fetch_ctx = client->mailbox->