]> granicus.if.org Git - apache/commitdiff
* include/ap_socache.h: Define AP_SOCACHE_DEFAULT_PROVIDER as a
authorJoe Orton <jorton@apache.org>
Tue, 9 Dec 2008 14:52:59 +0000 (14:52 +0000)
committerJoe Orton <jorton@apache.org>
Tue, 9 Dec 2008 14:52:59 +0000 (14:52 +0000)
  default provider name, to allow consumers to use a default provider
  if not configured otherwise.

* modules/cache/mod_socache_shmcb.c (register_hooks): Register shmcb
  as the default provider.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@724723 13f79535-47bb-0310-9956-ffa450edef68

include/ap_socache.h
modules/cache/mod_socache_shmcb.c

index b037c0a6ee2ebcabffa61d1bc998027547d0cac1..8d0492e34db26acc5979414e7300c565d9b63859 100644 (file)
@@ -160,5 +160,8 @@ typedef struct ap_socache_provider_t {
 /** The provider version used to register socache providers. */
 #define AP_SOCACHE_PROVIDER_VERSION "0"
 
+/** Default provider name. */
+#define AP_SOCACHE_DEFAULT_PROVIDER "default"
+
 #endif /* AP_SOCACHE_H */
 /** @} */
index 30f540284036c00720afd95ffd95719f3473b993..a973f2d492f0b1b95fb0e34debb029326f587864 100644 (file)
@@ -857,6 +857,12 @@ static void register_hooks(apr_pool_t *p)
     ap_register_provider(p, AP_SOCACHE_PROVIDER_GROUP, "shmcb", 
                          AP_SOCACHE_PROVIDER_VERSION,
                          &socache_shmcb);
+
+    /* Also register shmcb under the default provider name. */
+    ap_register_provider(p, AP_SOCACHE_PROVIDER_GROUP, 
+                         AP_SOCACHE_DEFAULT_PROVIDER,
+                         AP_SOCACHE_PROVIDER_VERSION,
+                         &socache_shmcb);
 }
 
 module AP_MODULE_DECLARE_DATA socache_shmcb_module = {