[dovecot-cvs]
dovecot/src/lib istream-limit.c,1.1,1.2 istream.c,1.14,1.15
cras at procontrol.fi
cras at procontrol.fi
Mon Nov 10 23:36:15 EET 2003
- Previous message: [dovecot-cvs] dovecot/src/auth mech-cram-md5.c,NONE,1.1
password-scheme-cram-md5.c,NONE,1.1
password-scheme-md5crypt.c,NONE,1.1 Makefile.am,1.22,1.23
auth-client-interface.h,1.1,1.2 auth-mech-desc.h,1.2,1.3
mech-digest-md5.c,1.16,1.17 mech.c,1.16,1.17 passdb.c,1.11,1.12
passdb.h,1.7,1.8 password-scheme.c,1.3,1.4
password-scheme.h,1.1,1.2 md5crypt.c,1.3,NONE md5crypt.h,1.2,NONE
- Next message: [dovecot-cvs] dovecot/src/lib-index/mbox mbox-rewrite.c,1.69,1.70
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv4635
Modified Files:
istream-limit.c istream.c
Log Message:
fixes
Index: istream-limit.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/istream-limit.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- istream-limit.c 9 Nov 2003 18:26:25 -0000 1.1
+++ istream-limit.c 10 Nov 2003 21:36:13 -0000 1.2
@@ -47,17 +47,19 @@
ssize_t ret;
size_t pos;
- if (stream->istream.v_offset >= lstream->v_size)
+ if (stream->istream.v_offset +
+ (stream->pos - stream->skip) >= lstream->v_size)
return -1;
if (lstream->input->v_offset !=
lstream->v_start_offset + stream->istream.v_offset) {
i_stream_seek(lstream->input,
- lstream->v_start_offset + stream->istream.v_offset);
+ lstream->v_start_offset +
+ stream->istream.v_offset);
}
if (i_stream_read(lstream->input) == -2 && stream->buffer != NULL) {
- if (lstream->istream.skip == 0)
+ if (stream->skip == 0)
return -2;
stream->istream.eof = lstream->input->eof;
}
@@ -70,9 +72,9 @@
if (pos > left)
pos = left;
- ret = pos <= lstream->istream.pos ? -1 :
+ ret = pos <= stream->pos ? -1 :
(ssize_t) (pos - stream->pos);
- lstream->istream.pos = pos;
+ stream->pos = pos;
return ret;
}
Index: istream.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/istream.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- istream.c 9 Nov 2003 18:26:25 -0000 1.14
+++ istream.c 10 Nov 2003 21:36:13 -0000 1.15
@@ -78,11 +78,15 @@
{
struct _istream *_stream = stream->real_stream;
+ if (v_offset > stream->v_offset) {
+ i_stream_skip(stream, v_offset - stream->v_offset);
+ return;
+ }
+
if (stream->closed)
return;
- if (v_offset < stream->v_offset)
- stream->eof = FALSE;
+ stream->eof = FALSE;
_stream->seek(_stream, v_offset);
}
- Previous message: [dovecot-cvs] dovecot/src/auth mech-cram-md5.c,NONE,1.1
password-scheme-cram-md5.c,NONE,1.1
password-scheme-md5crypt.c,NONE,1.1 Makefile.am,1.22,1.23
auth-client-interface.h,1.1,1.2 auth-mech-desc.h,1.2,1.3
mech-digest-md5.c,1.16,1.17 mech.c,1.16,1.17 passdb.c,1.11,1.12
passdb.h,1.7,1.8 password-scheme.c,1.3,1.4
password-scheme.h,1.1,1.2 md5crypt.c,1.3,NONE md5crypt.h,1.2,NONE
- Next message: [dovecot-cvs] dovecot/src/lib-index/mbox mbox-rewrite.c,1.69,1.70
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list