[dovecot-cvs] 
	dovecot/src/imap imap-fetch.c, 1.27, 1.28 imap-fetch.h, 1.10, 1.11
    cras at dovecot.org 
    cras at dovecot.org
       
    Sun Oct  3 15:28:59 EEST 2004
    
        - Previous message: [dovecot-cvs] dovecot/src/login-common main.c, 1.20,
	1.21 ssl-proxy-gnutls.c, 1.9, 1.10 ssl-proxy-openssl.c, 1.26,
	1.27 ssl-proxy.c, 1.4, 1.5
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-file.c, 1.5,
	1.6
-  Messages sorted by: 
              [ date ]
              [ thread ]
              [ subject ]
              [ author ]
         
  
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv17223
Modified Files:
	imap-fetch.c imap-fetch.h 
Log Message:
If fetching fails, finish sending the untagged FETCH reply correctly.
Index: imap-fetch.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- imap-fetch.c	28 Sep 2004 10:55:36 -0000	1.27
+++ imap-fetch.c	3 Oct 2004 12:28:57 -0000	1.28
@@ -204,6 +204,7 @@
 			str_truncate(ctx->cur_str, 0);
 			str_append_c(ctx->cur_str, ' ');
 			ctx->first = TRUE;
+			ctx->line_finished = FALSE;
 		}
 
 		for (; ctx->cur_handler < size; ctx->cur_handler++) {
@@ -231,6 +232,7 @@
 			str_truncate(ctx->cur_str, 0);
 		}
 
+		ctx->line_finished = TRUE;
 		if (o_stream_send(ctx->client->output, ")\r\n", 3) < 0)
 			return -1;
 
@@ -245,6 +247,11 @@
 {
 	str_free(ctx->cur_str);
 
+	if (!ctx->line_finished) {
+		if (o_stream_send(ctx->client->output, ")\r\n", 3) < 0)
+			return -1;
+	}
+
 	if (ctx->cur_input != NULL) {
 		i_stream_unref(ctx->cur_input);
 		ctx->cur_input = NULL;
Index: imap-fetch.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-fetch.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- imap-fetch.h	28 Sep 2004 10:55:37 -0000	1.10
+++ imap-fetch.h	3 Oct 2004 12:28:57 -0000	1.11
@@ -53,6 +53,7 @@
 	unsigned int cur_have_eoh:1;
 	unsigned int cur_append_eoh:1;
 	unsigned int first:1;
+	unsigned int line_finished:1;
 	unsigned int failed:1;
 };
 
    
    
        
	- Previous message: [dovecot-cvs] dovecot/src/login-common main.c, 1.20,
	1.21 ssl-proxy-gnutls.c, 1.9, 1.10 ssl-proxy-openssl.c, 1.26,
	1.27 ssl-proxy.c, 1.4, 1.5
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-file.c, 1.5,
	1.6
-  Messages sorted by: 
              [ date ]
              [ thread ]
              [ subject ]
              [ author ]
         
More information about the dovecot-cvs
mailing list