1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Change the provider names to match the module names:

mod_slotmem_shm: shared -> shm
mod_socache_memcache: mc -> memcache


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1210221 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Fritsch
2011-12-04 21:03:34 +00:00
parent 45750ca9ee
commit 6f6ecbeae7
7 changed files with 17 additions and 10 deletions

View File

@@ -120,7 +120,7 @@ the load on backends</description>
<usage> <usage>
<p>This is a server-wide setting to select a provider for the <p>This is a server-wide setting to select a provider for the
<a href="../socache.html">shared object cache</a>. <a href="../socache.html">shared object cache</a>.
Values are "dbm", "dc", "mc", or "shmcb", each subject to the Values are "dbm", "dc", "memcache", or "shmcb", each subject to the
appropriate module being loaded. If not set, your platform's appropriate module being loaded. If not set, your platform's
default will be used.</p> default will be used.</p>
</usage> </usage>

View File

@@ -52,7 +52,7 @@
<dt>"dc" (mod_socache_dc)</dt> <dt>"dc" (mod_socache_dc)</dt>
<dd>This makes use of the <a href="http://www.distcache.org/">distcache</a> <dd>This makes use of the <a href="http://www.distcache.org/">distcache</a>
distributed session caching libraries.</dd> distributed session caching libraries.</dd>
<dt>"mc" (mod_socache_memcache)</dt> <dt>"memcache" (mod_socache_memcache)</dt>
<dd>This makes use of the <a href="http://memcached.org/">memcached</a> <dd>This makes use of the <a href="http://memcached.org/">memcached</a>
high-performance, distributed memory object caching system.</dd> high-performance, distributed memory object caching system.</dd>
<dt>"shmcb" (mod_socache_shmcb)</dt> <dt>"shmcb" (mod_socache_shmcb)</dt>

View File

@@ -313,7 +313,7 @@ static const ap_socache_provider_t socache_mc = {
static void register_hooks(apr_pool_t *p) static void register_hooks(apr_pool_t *p)
{ {
#ifdef HAVE_APU_MEMCACHE #ifdef HAVE_APU_MEMCACHE
ap_register_provider(p, AP_SOCACHE_PROVIDER_GROUP, "mc", ap_register_provider(p, AP_SOCACHE_PROVIDER_GROUP, "memcache",
AP_SOCACHE_PROVIDER_VERSION, AP_SOCACHE_PROVIDER_VERSION,
&socache_mc); &socache_mc);
#endif #endif

View File

@@ -681,10 +681,13 @@ 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", storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shm",
AP_SLOTMEM_PROVIDER_VERSION); 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,
"failed to lookup provider 'shm' for '%s', "
"maybe you need to load mod_slotmem_shm?",
AP_SLOTMEM_PROVIDER_GROUP);
return !OK; return !OK;
} }
storage->create(&slotmem, "mod_heartmonitor", sizeof(hm_slot_server_t), maxworkers, AP_SLOTMEM_TYPE_PREGRAB, p); storage->create(&slotmem, "mod_heartmonitor", sizeof(hm_slot_server_t), maxworkers, AP_SLOTMEM_TYPE_PREGRAB, p);

View File

@@ -371,10 +371,13 @@ 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", storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shm",
AP_SLOTMEM_PROVIDER_VERSION); 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,
"Failed to lookup provider 'shm' for '%s'. Maybe you "
"need to load mod_slotmem_shm?",
AP_SLOTMEM_PROVIDER_GROUP);
return OK; return OK;
} }

View File

@@ -716,11 +716,12 @@ 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", storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shm",
AP_SLOTMEM_PROVIDER_VERSION); AP_SLOTMEM_PROVIDER_VERSION);
if (!storage) { if (!storage) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01177) ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01177)
"ap_lookup_provider %s failed: is mod_slotmem_shm loaded??", "Failed to lookup provider 'shm' for '%s': is "
"mod_slotmem_shm loaded??",
AP_SLOTMEM_PROVIDER_GROUP); AP_SLOTMEM_PROVIDER_GROUP);
return !OK; return !OK;
} }

View File

@@ -657,7 +657,7 @@ 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", ap_register_provider(p, AP_SLOTMEM_PROVIDER_GROUP, "shm",
AP_SLOTMEM_PROVIDER_VERSION, storage); 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);