Author: jfrederic.clere(a)jboss.com
Date: 2008-05-14 16:43:46 -0400 (Wed, 14 May 2008)
New Revision: 1602
Modified:
trunk/mod_cluster/native/mod_slotmem/mod_sharedmem.c
trunk/mod_cluster/native/mod_slotmem/sharedmem_util.c
Log:
Use mem_getstorage() and arrange it.
Modified: trunk/mod_cluster/native/mod_slotmem/mod_sharedmem.c
===================================================================
--- trunk/mod_cluster/native/mod_slotmem/mod_sharedmem.c 2008-05-14 13:34:30 UTC (rev
1601)
+++ trunk/mod_cluster/native/mod_slotmem/mod_sharedmem.c 2008-05-14 20:43:46 UTC (rev
1602)
@@ -49,13 +49,13 @@
"Fatal error: unable to create global pool for shared
slotmem");
return rv;
}
- sharedmem_initglobalpool(global_pool);
+ mem_getstorage(global_pool, "");
return OK;
}
static void ap_sharedmem_register_hook(apr_pool_t *p)
{
- const slotmem_storage_method *storage = sharedmem_getstorage();
+ const slotmem_storage_method *storage = mem_getstorage(NULL, "");
ap_register_provider(p, SLOTMEM_STORAGE, "shared", "0",
storage);
ap_hook_post_config(initialize_cleanup, NULL, NULL, APR_HOOK_LAST);
ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
Modified: trunk/mod_cluster/native/mod_slotmem/sharedmem_util.c
===================================================================
--- trunk/mod_cluster/native/mod_slotmem/sharedmem_util.c 2008-05-14 13:34:30 UTC (rev
1601)
+++ trunk/mod_cluster/native/mod_slotmem/sharedmem_util.c 2008-05-14 20:43:46 UTC (rev
1602)
@@ -472,7 +472,7 @@
* and initialise the global pool */
const slotmem_storage_method *mem_getstorage(apr_pool_t *p, char *type)
{
- if (globalpool == NULL)
+ if (globalpool == NULL && p != NULL)
globalpool = p;
return(&storage);
}
Show replies by date