]> granicus.if.org Git - apache/commitdiff
Only persist if we want it to
authorJim Jagielski <jim@apache.org>
Mon, 7 Feb 2011 19:32:31 +0000 (19:32 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 7 Feb 2011 19:32:31 +0000 (19:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1068072 13f79535-47bb-0310-9956-ffa450edef68

modules/slotmem/mod_slotmem_shm.c

index 17b0311571bfda8f544c16d5f61a267b3c57ce20..23fdf82020aeaaa3a01cdab36099e1667e94bd4f 100644 (file)
@@ -43,6 +43,7 @@
 #endif
 
 #define AP_SLOTMEM_IS_PREGRAB(t) (t->desc.type & AP_SLOTMEM_TYPE_PREGRAB)
+#define AP_SLOTMEM_IS_PERSIST(t) (t->desc.type & AP_SLOTMEM_TYPE_PERSIST)
 
 /* The description of the slots to reuse the slotmem */
 typedef struct {
@@ -208,7 +209,9 @@ static apr_status_t cleanup_slotmem(void *param)
         ap_slotmem_instance_t *next = *mem;
         apr_pool_t *p = next->gpool;
         while (next) {
-            store_slotmem(next);
+            if (AP_SLOTMEM_IS_PERSIST(next)) {
+                store_slotmem(next);
+            }
             apr_shm_destroy((apr_shm_t *)next->shm);
             next = next->next;
         }