[dovecot-cvs]
dovecot/src/lib istream.c, 1.24, 1.25 istream.h, 1.12, 1.13
cras at dovecot.org
cras at dovecot.org
Wed Sep 15 02:58:29 EEST 2004
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv27093/lib
Modified Files:
istream.c istream.h
Log Message:
i_stream_read_data(): return 0 if i_stream_read() returned 0.
Index: istream.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- istream.c 7 Sep 2004 14:23:01 -0000 1.24
+++ istream.c 14 Sep 2004 23:58:26 -0000 1.25
@@ -188,7 +188,7 @@
*data = i_stream_get_data(stream, size);
return ret == -2 ? -2 :
- (read_more ? 0 : -1);
+ (read_more || ret == 0 ? 0 : -1);
}
struct istream *_i_stream_create(struct _istream *_stream, pool_t pool, int fd,
Index: istream.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- istream.h 22 Aug 2004 04:00:06 -0000 1.12
+++ istream.h 14 Sep 2004 23:58:26 -0000 1.13
@@ -65,7 +65,8 @@
size_t *size);
/* Like i_stream_get_data(), but read more when needed. Returns 1 if more
than threshold bytes are available, 0 if less, -1 if error or EOF with no
- bytes available, or -2 if stream's input buffer is full. */
+ bytes read that weren't already in buffer, or -2 if stream's input buffer
+ is full. */
int i_stream_read_data(struct istream *stream, const unsigned char **data,
size_t *size, size_t threshold);
More information about the dovecot-cvs
mailing list