[dovecot-cvs] dovecot/src/lib ostream-file.c,1.56,1.57

cras at dovecot.org cras at dovecot.org
Wed Oct 19 16:20:10 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv15726

Modified Files:
	ostream-file.c 
Log Message:
Revert previous "cleanup" which broke things.. Added a comment.



Index: ostream-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ostream-file.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- ostream-file.c	15 Oct 2005 22:21:31 -0000	1.56
+++ ostream-file.c	19 Oct 2005 13:20:07 -0000	1.57
@@ -367,7 +367,13 @@
 			fstream->io = NULL;
 		}
 	} else {
-		i_assert(fstream->io != NULL);
+		/* Add the IO handler if it's not there already. Callback
+		   might have just returned 0 without there being any data
+		   to be sent. */
+		if (fstream->io == NULL) {
+			fstream->io = io_add(fstream->fd, IO_WRITE,
+					     stream_send_io, fstream);
+		}
 	}
 
 	o_stream_unref(&fstream->ostream.ostream);



More information about the dovecot-cvs mailing list