[dovecot-cvs] dovecot/src/lib istream-seekable.c,1.1,1.2

cras at dovecot.org cras at dovecot.org
Sat Apr 23 22:35:07 EEST 2005


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

Modified Files:
	istream-seekable.c 
Log Message:
Fixes.



Index: istream-seekable.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream-seekable.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- istream-seekable.c	29 Mar 2005 13:30:55 -0000	1.1
+++ istream-seekable.c	23 Apr 2005 19:35:05 -0000	1.2
@@ -196,6 +196,7 @@
 	size_t size;
 	ssize_t ret;
 
+	stream->buffer = CONST_PTR_OFFSET(stream->buffer, stream->skip);
 	stream->pos -= stream->skip;
 	stream->skip = 0;
 
@@ -240,7 +241,9 @@
 
 static void _seek(struct _istream *stream, uoff_t v_offset)
 {
+	stream->istream.stream_errno = 0;
 	stream->istream.v_offset = v_offset;
+	stream->skip = stream->pos = 0;
 }
 
 static const struct stat *_stat(struct _istream *stream)



More information about the dovecot-cvs mailing list