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

From: Novell Forge SVN <noreply_at_novell.com>
Date: Tue, 24 Feb 2009 09:20:51 -0700 (MST)
Author: poeml
Date: 2009-02-24 09:20:49 -0700 (Tue, 24 Feb 2009)
New Revision: 6555

Modified:
   trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c
Log:
mod_mirrorbrain: 
- implement the missing redirection exceptions mirrors marked AS-only or
  prefix-only.


Modified: trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c
===================================================================
--- trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c	2009-02-24 16:04:49 UTC (rev 6554)
+++ trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c	2009-02-24 16:20:49 UTC (rev 6555)
@@ -1238,12 +1238,15 @@
         }
 
         /* same AS? */
-        else if (strcmp(new->as, as) == 0) {
+        else if ((strcmp(new->as, as) == 0) 
+                   && (new->prefix_only != 1)) {
             *(void **)apr_array_push(mirrors_same_as) = new;
         }
 
         /* same country? */
-        else if (strcasecmp(new->country_code, country_code) == 0) {
+        else if ((strcasecmp(new->country_code, country_code) == 0) 
+                   && (new->as_only != 1)
+                   && (new->prefix_only != 1)) {
             *(void **)apr_array_push(mirrors_same_country) = new;
         }
 
@@ -1267,14 +1270,19 @@
         /* to be actually considered for this group, the mirror must be willing 
          * to take redirects from foreign country */
         else if ((strcasecmp(new->region, continent_code) == 0) 
-                    && (new->country_only != 1)) {
+                    && (new->country_only != 1)
+                    && (new->as_only != 1)
+                    && (new->prefix_only != 1)) {
             *(void **)apr_array_push(mirrors_same_region) = new;
         }
 
         /* to be considered as "worldwide" mirror, it must be willing 
          * to take redirects from foreign regions.
          * (N.B. region_only implies country_only)  */
-        else if ((new->region_only != 1) && (new->country_only != 1)) {
+        else if ((new->region_only != 1) 
+                    && (new->country_only != 1)
+                    && (new->as_only != 1)
+                    && (new->prefix_only != 1)) {
             *(void **)apr_array_push(mirrors_elsewhere) = new;
         }
 

_______________________________________________
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 2009-02-24Z16:21:21

This archive was generated by hypermail 2.2.0 : 2009-07-10Z19:18:11 GMT