[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-cvs
Subject:    cvs commit: httpd-2.0/modules/experimental util_ldap_cache_mgr.c
From:       bnicholes () apache ! org
Date:       2004-09-29 17:22:53
Message-ID: 20040929172253.90875.qmail () minotaur ! apache ! org
[Download RAW message or body]

bnicholes    2004/09/29 10:22:53

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES STATUS
               modules/experimental Tag: APACHE_2_0_BRANCH
                        util_ldap_cache_mgr.c
  Log:
  Fix the re-linking issue that was causing a segfault when purging elements from the LDAP cache.
  PR 24801
  
  submitted by: [Jess Holle <jessh ptc.com>]
  reviewed by: minfrin, bnicholes, clar
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.988.2.364 +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.363
  retrieving revision 1.988.2.364
  diff -u -r1.988.2.363 -r1.988.2.364
  --- CHANGES	24 Sep 2004 14:29:26 -0000	1.988.2.363
  +++ CHANGES	29 Sep 2004 17:22:49 -0000	1.988.2.364
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.53
   
  +  *) Fix the re-linking issue when purging elements from the LDAP cache
  +     PR 24801 [Jess Holle <jessh ptc.com>]
  +      
     *) mod_disk_cache: Fix races in saving responses.  [Justin Erenkrantz]
   
     *) Fix Expires handling in mod_cache.  [Justin Erenkrantz]
  
  
  
  1.751.2.1092 +1 -9      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.1091
  retrieving revision 1.751.2.1092
  diff -u -r1.751.2.1091 -r1.751.2.1092
  --- STATUS	28 Sep 2004 22:32:06 -0000	1.751.2.1091
  +++ STATUS	29 Sep 2004 17:22:50 -0000	1.751.2.1092
  @@ -89,14 +89,6 @@
          modules/experimental/mod_disk_cache.c: 1.61
          +1: jerenkrantz, stoddard
   
  -    *) Fix a segfault in the LDAP cache purge. PR 24801
  -         modules/ldap/util_ldap_cache_mgr.c: 1.9, 1.10
  -       +1: minfrin, bnicholes, clar
  -       bnicholes - backporting modules/ldap/util_ldap_cache_mgr.c: r1.7 below
  -	    should eliminate the need to backport the "else" condition included
  -	    in this patch.
  -       minfrin: The excess "else" condition has been removed in v1.10.
  -
       *) mod_rewrite: Fix 0 bytes write into random memory position. PR 31036.
          (2.0 + 1.3)
            http://www.apache.org/~nd/dbmmap_1.3.patch
  
  
  
  No                   revision
  No                   revision
  1.3.2.14  +9 -4      httpd-2.0/modules/experimental/Attic/util_ldap_cache_mgr.c
  
  Index: util_ldap_cache_mgr.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/Attic/util_ldap_cache_mgr.c,v
  retrieving revision 1.3.2.13
  retrieving revision 1.3.2.14
  diff -u -r1.3.2.13 -r1.3.2.14
  --- util_ldap_cache_mgr.c	23 Sep 2004 16:55:37 -0000	1.3.2.13
  +++ util_ldap_cache_mgr.c	29 Sep 2004 17:22:53 -0000	1.3.2.14
  @@ -173,7 +173,7 @@
   void util_ald_cache_purge(util_ald_cache_t *cache)
   {
       unsigned long i;
  -    util_cache_node_t *p, *q;
  +    util_cache_node_t *p, *q, **pp;
       apr_time_t t;
   
       if (!cache)
  @@ -184,7 +184,8 @@
       cache->numpurges++;
   
       for (i=0; i < cache->size; ++i) {
  -        p = cache->nodes[i];
  +        pp = cache->nodes + i;
  +        p = *pp;
           while (p != NULL) {
               if (p->add_time < cache->marktime) {
                   q = p->next;
  @@ -192,10 +193,11 @@
                   util_ald_free(cache, p);
                   cache->numentries--;
                   cache->npurged++;
  -                p = q;
  +                p = *pp = q;
               }
               else {
  -                p = p->next;
  +                pp = &(p->next);
  +                p = *pp;
               }
           }
       }
  @@ -687,6 +689,9 @@
                       break;
               }
   
  +        }
  +        else {
  +            buf = "";
           }
       }
       else {
  
  
  
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic