You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2009/05/15 17:16:17 UTC

svn commit: r775186 - in /httpd/httpd/trunk: include/ap_slotmem.h modules/slotmem/mod_slotmem_plain.c modules/slotmem/mod_slotmem_shm.c

Author: jim
Date: Fri May 15 15:16:16 2009
New Revision: 775186

URL: http://svn.apache.org/viewvc?rev=775186&view=rev
Log:
compile-time issues

Modified:
    httpd/httpd/trunk/include/ap_slotmem.h
    httpd/httpd/trunk/modules/slotmem/mod_slotmem_plain.c
    httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c

Modified: httpd/httpd/trunk/include/ap_slotmem.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/ap_slotmem.h?rev=775186&r1=775185&r2=775186&view=diff
==============================================================================
--- httpd/httpd/trunk/include/ap_slotmem.h (original)
+++ httpd/httpd/trunk/include/ap_slotmem.h Fri May 15 15:16:16 2009
@@ -57,6 +57,9 @@
 
 typedef unsigned int ap_slotmem_type_t;
 
+#define AP_SLOTMEM_TYPE_PERSIST   (1 << 0)
+#define AP_SLOTMEM_TYPE_NOTMPSAFE (1 << 1)
+
 typedef struct ap_slotmem_instance_t ap_slotmem_instance_t;
 
 /**
@@ -143,6 +146,8 @@
     apr_size_t (* slot_size)(ap_slotmem_instance_t *s);
 };
 
+typedef struct ap_slotmem_provider_t ap_slotmem_provider_t;
+
 #ifdef __cplusplus
 }
 #endif

Modified: httpd/httpd/trunk/modules/slotmem/mod_slotmem_plain.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/slotmem/mod_slotmem_plain.c?rev=775186&r1=775185&r2=775186&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/slotmem/mod_slotmem_plain.c (original)
+++ httpd/httpd/trunk/modules/slotmem/mod_slotmem_plain.c Fri May 15 15:16:16 2009
@@ -201,7 +201,7 @@
 static void ap_plainmem_register_hook(apr_pool_t *p)
 {
     /* XXX: static const char * const prePos[] = { "mod_slotmem.c", NULL }; */
-    ap_register_provider(p, AP_SLOTMEM_STORAGE, "plain", "0", &storage);
+    ap_register_provider(p, AP_SLOTMEM_PROVIDER_GROUP, "plain", "0", &storage);
     ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
 }
 

Modified: httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c?rev=775186&r1=775185&r2=775186&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c (original)
+++ httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c Fri May 15 15:16:16 2009
@@ -317,7 +317,7 @@
         memcpy(ptr, &desc, sizeof(desc));
         ptr = ptr + sizeof(desc);
         memset(ptr, 0, dsize);
-        if (type == SLOTMEM_PERSIST)
+        if (type & AP_SLOTMEM_TYPE_PERSIST)
             restore_slotmem(ptr, fname, dsize, pool);
     }
 
@@ -675,7 +675,7 @@
 static void ap_sharedmem_register_hook(apr_pool_t *p)
 {
     const ap_slotmem_provider_t *storage = sharedmem_getstorage();
-    ap_register_provider(p, AP_SLOTMEM_STORAGE, "shared", "0", storage);
+    ap_register_provider(p, AP_SLOTMEM_PROVIDER_GROUP, "shared", "0", storage);
     ap_hook_post_config(post_config, NULL, NULL, APR_HOOK_LAST);
     ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
     ap_hook_child_init(child_init, NULL, NULL, APR_HOOK_MIDDLE);