]> granicus.if.org Git - apache/commitdiff
fix def'n of AP_SLOTMEM_PROVIDER_VERSION, use it
authorJeff Trawick <trawick@apache.org>
Thu, 14 Jul 2011 14:47:59 +0000 (14:47 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 14 Jul 2011 14:47:59 +0000 (14:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1146737 13f79535-47bb-0310-9956-ffa450edef68

include/ap_slotmem.h
modules/cluster/mod_heartmonitor.c
modules/proxy/balancers/mod_lbmethod_heartbeat.c
modules/proxy/mod_proxy_balancer.c
modules/slotmem/mod_slotmem_plain.c
modules/slotmem/mod_slotmem_shm.c

index 9f7db23a5c5457da5fe02a4b645288f508c6a724..81fde88a2aa4fdb2475446e7024dd1949620e46f 100644 (file)
@@ -49,7 +49,7 @@ extern "C" {
 #endif
 
 #define AP_SLOTMEM_PROVIDER_GROUP "slotmem"
-#define AP_SLOTMEM_PROVIDER_VERSION 0
+#define AP_SLOTMEM_PROVIDER_VERSION "0"
 
 typedef unsigned int ap_slotmem_type_t;
 
index f2240c66f22fc3fc78a8a725f72548d23d12e1bf..1ec1dc803c300f20a4e26eb36a2a0fbeeacee192 100644 (file)
@@ -683,7 +683,8 @@ static int hm_post_config(apr_pool_t *p, apr_pool_t *plog,
     if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_CONFIG) {
         /* this is the real thing */
         if (maxworkers) {
-            storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared", "0");
+            storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared",
+                                         AP_SLOTMEM_PROVIDER_VERSION);
             if (!storage) {
                 ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s, "ap_lookup_provider %s failed", AP_SLOTMEM_PROVIDER_GROUP);
                 return !OK;
index 11d28f41a27d08881c8ab10432fb8bc070b7a948..e8dbbc122a9d58cd425c75d5782e01628dba2ef5 100644 (file)
@@ -396,7 +396,8 @@ static int lb_hb_init(apr_pool_t *p, apr_pool_t *plog,
     if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG)
         return OK;
 
-    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared", "0");
+    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared",
+                                 AP_SLOTMEM_PROVIDER_VERSION);
     if (!storage) {
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s, "ap_lookup_provider %s failed", AP_SLOTMEM_PROVIDER_GROUP);
         return OK;
index 8123cfaafb486a9dbe67591b408093304a7fa36b..aa2de4162a120913611ae4560d151880b0755abf 100644 (file)
@@ -703,7 +703,8 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
     /*
      * Get slotmem setups
      */
-    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared", "0");
+    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared",
+                                 AP_SLOTMEM_PROVIDER_VERSION);
     if (!storage) {
         ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s,
                      "ap_lookup_provider %s failed: is mod_slotmem_shm loaded??",
index 2bf832922f7d3d6b6d446e775e9c582ca0c68b54..0a6bccb50b26e8a77701608361b5ad2d222d0040 100644 (file)
@@ -300,7 +300,8 @@ static int pre_config(apr_pool_t *p, apr_pool_t *plog,
 static void ap_slotmem_plain_register_hook(apr_pool_t *p)
 {
     /* XXX: static const char * const prePos[] = { "mod_slotmem.c", NULL }; */
-    ap_register_provider(p, AP_SLOTMEM_PROVIDER_GROUP, "plain", "0", &storage);
+    ap_register_provider(p, AP_SLOTMEM_PROVIDER_GROUP, "plain",
+                         AP_SLOTMEM_PROVIDER_VERSION, &storage);
     ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
 }
 
index 67736bac306d7d70ac11d03de2b49d269725e8d4..f82f63c18eb499a9750d85dc8e98a57b702be38b 100644 (file)
@@ -657,7 +657,8 @@ static int pre_config(apr_pool_t *p, apr_pool_t *plog,
 static void ap_slotmem_shm_register_hook(apr_pool_t *p)
 {
     const ap_slotmem_provider_t *storage = slotmem_shm_getstorage();
-    ap_register_provider(p, AP_SLOTMEM_PROVIDER_GROUP, "shared", "0", storage);
+    ap_register_provider(p, AP_SLOTMEM_PROVIDER_GROUP, "shared",
+                         AP_SLOTMEM_PROVIDER_VERSION, storage);
     ap_hook_post_config(post_config, NULL, NULL, APR_HOOK_LAST);
     ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
 }