You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2013/01/13 13:26:51 UTC

svn commit: r1432601 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS modules/slotmem/mod_slotmem_shm.c

Author: minfrin
Date: Sun Jan 13 12:26:51 2013
New Revision: 1432601

URL: http://svn.apache.org/viewvc?rev=1432601&view=rev
Log:
mod_slotmem_shm: Fix mistaken reset of num_free for restored shm
trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1430869

Submitted by: jim
Reviewed by: humbedooh, minfrin

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1430869

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1432601&r1=1432600&r2=1432601&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Sun Jan 13 12:26:51 2013
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.4
 
+  * mod_slotmem_shm: Fix mistaken reset of num_free for restored shm.
+    [Jim Jagielski]
+
   * mod_proxy: non-existance of byrequests is not an immediate error.
     [Jim Jagielski]
 

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1432601&r1=1432600&r2=1432601&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Sun Jan 13 12:26:51 2013
@@ -91,11 +91,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * mod_slotmem_shm: Fix mistaken reset of num_free for restored shm
-    trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1430869
-    2.4.x patch: trunk patch works
-    +1: jim, humbedooh, minfrin
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c?rev=1432601&r1=1432600&r2=1432601&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c (original)
+++ httpd/httpd/branches/2.4.x/modules/slotmem/mod_slotmem_shm.c Sun Jan 13 12:26:51 2013
@@ -296,6 +296,7 @@ static apr_status_t slotmem_create(ap_sl
 {
 /*    void *slotmem = NULL; */
     int fbased = 1;
+    int restored = 0;
     char *ptr;
     sharedslotdesc_t desc;
     ap_slotmem_instance_t *res;
@@ -390,6 +391,7 @@ static apr_status_t slotmem_create(ap_sl
          */
         if (type & AP_SLOTMEM_TYPE_PERSIST) {
             restore_slotmem(ptr, fname, dsize, pool);
+            restored = 1;
         }
     }
 
@@ -400,7 +402,9 @@ static apr_status_t slotmem_create(ap_sl
     res->fbased = fbased;
     res->shm = shm;
     res->num_free = (unsigned int *)ptr;
-    *res->num_free = item_num;
+    if (!restored) {
+        *res->num_free = item_num;
+    }
     res->persist = (void *)ptr;
     ptr += AP_UNSIGNEDINT_OFFSET;
     res->base = (void *)ptr;