apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bp...@pacbell.net>
Subject bug in apr_brigade_write?
Date Sat, 29 Jun 2002 03:10:16 GMT
  APU_DECLARE(apr_status_t) apr_brigade_write(apr_bucket_brigade *b,
                                              apr_brigade_flush flush,
                                              void *ctx,
                                              const char *str, 
apr_size_t nbyte)
  {
      apr_bucket *e = APR_BRIGADE_LAST(b);
      apr_size_t remaining = APR_BUCKET_BUFF_SIZE;
      char *buf = NULL;
 
      if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e)) {
          apr_bucket_heap *h = e->data;
 
          remaining = h->alloc_len - e->length;
          buf = h->base + e->start + e->length;
      }

Shouldn't that be "remaining = h->alloc_len - (e->length + e->start)"?

--Brian



Mime
View raw message