[dovecot-cvs] dovecot/src/lib-index/mbox mbox-rewrite.c,1.37,1.38

cras at procontrol.fi cras at procontrol.fi
Wed Nov 13 03:36:18 EET 2002


Update of /home/cvs/dovecot/src/lib-index/mbox
In directory danu:/tmp/cvs-serv27921/lib-index/mbox

Modified Files:
	mbox-rewrite.c 
Log Message:
Use blocking output buffers when writing to files.



Index: mbox-rewrite.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mbox/mbox-rewrite.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- mbox-rewrite.c	4 Nov 2002 04:47:40 -0000	1.37
+++ mbox-rewrite.c	13 Nov 2002 01:36:16 -0000	1.38
@@ -375,6 +375,7 @@
 	inbuf = i_buffer_create_mmap(in_fd, data_stack_pool,
 				     1024*256, 0, 0, FALSE);
 	outbuf = o_buffer_create_file(out_fd, data_stack_pool, 1024, 0, FALSE);
+	o_buffer_set_blocking(outbuf, 60000, NULL, NULL);
 
 	ret = o_buffer_send_ibuffer(outbuf, inbuf);
 	if (ret < 0)
@@ -468,6 +469,7 @@
 	/* note: we can't use data_stack_pool with outbuf because it's
 	   being written to inside t_push() .. t_pop() calls */
 	outbuf = o_buffer_create_file(tmp_fd, system_pool, 8192, 0, FALSE);
+	o_buffer_set_blocking(outbuf, 60000, NULL, NULL);
 
 	failed = FALSE; seq = 1;
 	rec = index->lookup(index, 1);




More information about the dovecot-cvs mailing list