[mirrorbrain-commits] [opensuse-svn] r6370 - trunk/tools/download-redirector-v2/mod_mirrorbrain

From: Novell Forge SVN <noreply_at_novell.com>
Date: Wed, 4 Feb 2009 08:27:20 -0700 (MST)
Author: poeml
Date: 2009-02-04 08:27:14 -0700 (Wed, 04 Feb 2009)
New Revision: 6370

Modified:
   trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c
Log:
mod_mirrorbrain: 
 - for reasons of consistency, remove the MirrorBrainInstance directive when
   the module is compiled without memcache support - because it was used only
   to give memcache keys a unique name.


Modified: trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c
===================================================================
--- trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c	2009-02-04 15:13:57 UTC (rev 6369)
+++ trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c	2009-02-04 15:27:14 UTC (rev 6370)
_at_@ -149,8 +149,8 @@
 /* per-server configuration */
 typedef struct
 {
+#ifdef WITH_MEMCACHE
     const char *instance;
-#ifdef WITH_MEMCACHE
     int memcached_on;
     int memcached_lifetime;
 #endif
_at_@ -306,8 +306,8 @@
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, 
             "[mod_mirrorbrain] creating server config");
 
+#ifdef WITH_MEMCACHE
     new->instance = "default";
-#ifdef WITH_MEMCACHE
     new->memcached_on = UNSET;
     new->memcached_lifetime = UNSET;
 #endif
_at_@ -330,8 +330,8 @@
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, 
             "[mod_mirrorbrain] merging server config");
 
+#ifdef WITH_MEMCACHE
     cfgMergeString(instance);
-#ifdef WITH_MEMCACHE
     cfgMergeBool(memcached_on);
     cfgMergeInt(memcached_lifetime);
 #endif
_at_@ -433,6 +433,7 @@
     return NULL;
 }
 
+#ifdef WITH_MEMCACHE
 static const char *mb_cmd_instance(cmd_parms *cmd, 
                                    void *config, const char *arg1)
 {
_at_@ -443,6 +444,7 @@
     cfg->instance = arg1;
     return NULL;
 }
+#endif
 
 static const char *mb_cmd_dbdquery(cmd_parms *cmd, void *config, 
                                    const char *arg1)
_at_@ -627,8 +629,13 @@
     if (cfg->engine_on != 1) {
         return DECLINED;
     }
+#ifdef WITH_MEMCACHE
     debugLog(r, cfg, "MirrorBrainEngine On, instance '%s', mirror_base '%s'", 
             scfg->instance, cfg->mirror_base);
+#else
+    debugLog(r, cfg, "MirrorBrainEngine On, mirror_base '%s'", 
+            cfg->mirror_base);
+#endif
 
     /* is it a HEAD request? */
     if (r->header_only && cfg->handle_headrequest_locally) {
_at_@ -1752,10 +1759,6 @@
                   ".torrent files, and add them into generated metalinks"),
 
     /* to be used only in server context */
-    AP_INIT_TAKE1("MirrorBrainInstance", mb_cmd_instance, NULL, 
-                  RSRC_CONF, 
-                  "Name of the MirrorBrain instance"),
-
     AP_INIT_TAKE1("MirrorBrainDBDQuery", mb_cmd_dbdquery, NULL,
                   RSRC_CONF,
                   "the SQL query string to fetch the mirrors from the backend database"),
_at_@ -1771,6 +1774,10 @@
 #endif
 
 #ifdef WITH_MEMCACHE
+    AP_INIT_TAKE1("MirrorBrainInstance", mb_cmd_instance, NULL, 
+                  RSRC_CONF, 
+                  "Name of the MirrorBrain instance (used by Memcache)"),
+
     AP_INIT_FLAG("MirrorBrainMemcached", mb_cmd_memcached_on, NULL,
                   RSRC_CONF, 
                   "Set to On/Off to use memcached to give clients repeatedly the same mirror"),

_______________________________________________
Opensuse-svn mailing list
Opensuse-svn_at_forge.novell.com
http://forge.novell.com/mailman/listinfo/opensuse-svn


_______________________________________________
mirrorbrain-commits mailing list

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Wed Feb 04 2009 - 15:27:39 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT