[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c,
	1.21, 1.22
    cras at dovecot.org 
    cras at dovecot.org
       
    Sun Aug 22 06:20:01 EEST 2004
    
        - Previous message: [dovecot-cvs] dovecot/src/lib-storage mail-save.c,1.11,1.12
 
        - Next message: [dovecot-cvs] dovecot/src/lib istream-data.c, 1.9,
	1.10 istream-file.c, 1.18, 1.19 istream-limit.c, 1.7,
	1.8 istream-mmap.c, 1.12, 1.13 istream.c, 1.20, 1.21 istream.h,
	1.11, 1.12
 
         -  Messages sorted by: 
              [ date ]
              [ thread ]
              [ subject ]
              [ author ]
         
 
       
    
  
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv28081/lib-storage/index/mbox
Modified Files:
	mbox-sync-parse.c 
Log Message:
message_parse_header_next() can now return "need more data" with nonblocking
input streams.
Index: mbox-sync-parse.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- mbox-sync-parse.c	31 Jul 2004 00:33:53 -0000	1.21
+++ mbox-sync-parse.c	22 Aug 2004 03:19:59 -0000	1.22
@@ -362,7 +362,7 @@
 	struct message_header_line *hdr;
 	struct header_func *func;
 	size_t line_start_pos;
-	int i;
+	int i, ret;
 
 	ctx->hdr_offset = ctx->mail.offset;
 
@@ -379,7 +379,7 @@
 
         line_start_pos = 0;
 	hdr_ctx = message_parse_header_init(input, NULL, FALSE);
-	while ((hdr = message_parse_header_next(hdr_ctx)) != NULL) {
+	while ((ret = message_parse_header_next(hdr_ctx, &hdr)) > 0) {
 		if (hdr->eoh) {
 			ctx->have_eoh = TRUE;
 			break;
@@ -417,6 +417,7 @@
 		if (!hdr->no_newline)
 			str_append_c(ctx->header, '\n');
 	}
+	i_assert(ret != 0);
 	message_parse_header_deinit(hdr_ctx);
 
 	md5_final(&ctx->hdr_md5_ctx, ctx->hdr_md5_sum);
    
    
        
	- Previous message: [dovecot-cvs] dovecot/src/lib-storage mail-save.c,1.11,1.12
 
	- Next message: [dovecot-cvs] dovecot/src/lib istream-data.c, 1.9,
	1.10 istream-file.c, 1.18, 1.19 istream-limit.c, 1.7,
	1.8 istream-mmap.c, 1.12, 1.13 istream.c, 1.20, 1.21 istream.h,
	1.11, 1.12
 
         -  Messages sorted by: 
              [ date ]
              [ thread ]
              [ subject ]
              [ author ]
         
 
       
More information about the dovecot-cvs
mailing list