You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rb...@apache.org on 2001/08/08 21:53:21 UTC
cvs commit: apr-util/buckets apr_brigade.c
rbb 01/08/08 12:53:21
Modified: buckets apr_brigade.c
Log:
Change how apr_brigade_partition handles error conditions. If we have
hit an error, apr_brigade_partition sets the after_point parameter to the
last bucket that it was able to deal with. This means that if we asked
for the brigade to be partitioned at point 9 and we are using non-blocking
I/O on the brigade, but we only have 5 char's in the brigade, then we
partition at spot 5, return the bucket after the 5th char, and return
APR_EAGAIN.
Revision Changes Path
1.21 +4 -4 apr-util/buckets/apr_brigade.c
Index: apr_brigade.c
===================================================================
RCS file: /home/cvs/apr-util/buckets/apr_brigade.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- apr_brigade.c 2001/08/08 15:40:35 1.20
+++ apr_brigade.c 2001/08/08 19:53:21 1.21
@@ -150,8 +150,8 @@
if ((point > (apr_size_t)(-1)) && (e->length == (apr_size_t)(-1))) {
/* XXX: point is too far out to simply split this bucket,
* we must fix this bucket's size and keep going... */
- if ((rv = apr_bucket_read(e, &s, &len, block))
- != APR_SUCCESS) {
+ if ((rv = apr_bucket_read(e, &s, &len, block)) != APR_SUCCESS) {
+ *after_point = e;
return rv;
}
}
@@ -167,8 +167,8 @@
/* if the bucket cannot be split, we must read from it,
* changing its type to one that can be split */
- if ((rv = apr_bucket_read(e, &s, &len, block))
- != APR_SUCCESS) {
+ if ((rv = apr_bucket_read(e, &s, &len, block)) != APR_SUCCESS) {
+ *after_point = e;
return rv;
}