mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
fix def'n of AP_SLOTMEM_PROVIDER_VERSION, use it
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1146737 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -49,7 +49,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define AP_SLOTMEM_PROVIDER_GROUP "slotmem"
|
#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;
|
typedef unsigned int ap_slotmem_type_t;
|
||||||
|
|
||||||
|
@@ -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) {
|
if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_CONFIG) {
|
||||||
/* this is the real thing */
|
/* this is the real thing */
|
||||||
if (maxworkers) {
|
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) {
|
if (!storage) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s, "ap_lookup_provider %s failed", AP_SLOTMEM_PROVIDER_GROUP);
|
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s, "ap_lookup_provider %s failed", AP_SLOTMEM_PROVIDER_GROUP);
|
||||||
return !OK;
|
return !OK;
|
||||||
|
@@ -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)
|
if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG)
|
||||||
return OK;
|
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) {
|
if (!storage) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s, "ap_lookup_provider %s failed", AP_SLOTMEM_PROVIDER_GROUP);
|
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s, "ap_lookup_provider %s failed", AP_SLOTMEM_PROVIDER_GROUP);
|
||||||
return OK;
|
return OK;
|
||||||
|
@@ -703,7 +703,8 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
|
|||||||
/*
|
/*
|
||||||
* Get slotmem setups
|
* 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) {
|
if (!storage) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s,
|
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s,
|
||||||
"ap_lookup_provider %s failed: is mod_slotmem_shm loaded??",
|
"ap_lookup_provider %s failed: is mod_slotmem_shm loaded??",
|
||||||
|
@@ -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)
|
static void ap_slotmem_plain_register_hook(apr_pool_t *p)
|
||||||
{
|
{
|
||||||
/* XXX: static const char * const prePos[] = { "mod_slotmem.c", NULL }; */
|
/* 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);
|
ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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)
|
static void ap_slotmem_shm_register_hook(apr_pool_t *p)
|
||||||
{
|
{
|
||||||
const ap_slotmem_provider_t *storage = slotmem_shm_getstorage();
|
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_post_config(post_config, NULL, NULL, APR_HOOK_LAST);
|
||||||
ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
|
ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user