You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2002/05/03 21:09:29 UTC

cvs commit: httpd-2.0/modules/experimental mod_mem_cache.c

stoddard    02/05/03 12:09:28

  Modified:    modules/experimental mod_mem_cache.c
  Log:
  Don't open for business before the cache objec is fully initialized.
  
  Revision  Changes    Path
  1.51      +3 -2      httpd-2.0/modules/experimental/mod_mem_cache.c
  
  Index: mod_mem_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_mem_cache.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- mod_mem_cache.c	30 Apr 2002 03:25:12 -0000	1.50
  +++ mod_mem_cache.c	3 May 2002 19:09:28 -0000	1.51
  @@ -728,6 +728,7 @@
       apr_read_type_e eblock = APR_BLOCK_READ;
       apr_bucket *e;
       char *cur;
  +    int eos = 0;
   
       if (mobj->type == CACHE_TYPE_FILE) {
           apr_file_t *file = NULL;
  @@ -741,7 +742,7 @@
            */
           APR_BRIGADE_FOREACH(e, b) {
               if (APR_BUCKET_IS_EOS(e)) {
  -                obj->complete = 1;
  +                eos = 1;
               }
               else if (APR_BUCKET_IS_FILE(e)) {
                   apr_bucket_file *a = e->data;
  @@ -752,7 +753,7 @@
                   other++;
               }
           }
  -        if (fd == 1 && !other && obj->complete) {
  +        if (fd == 1 && !other && eos) {
               apr_file_t *tmpfile;
               /* Open a new XTHREAD handle to the file */
               rv = apr_file_open(&tmpfile, r->filename,