Author: poeml Date: 2009-02-24 09:33:01 -0700 (Tue, 24 Feb 2009) New Revision: 6560 Modified: trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c Log: mod_mirrorbrain: - avoid rendering invalid XML for metalinks, when autonomous system or network prefix are unknown, and set to "--". Show "unknown" instead. 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:31:44 UTC (rev 6559) +++ trunk/tools/download-redirector-v2/mod_mirrorbrain/mod_mirrorbrain.c 2009-02-24 16:33:01 UTC (rev 6560) _at_@ -1613,7 +1613,8 @@ * we'll decrement it for each mirror by one, until zero is reached */ int pref = 101; - ap_rprintf(r, "\n <!-- Mirrors in the same network (%s): -->\n", prefix); + ap_rprintf(r, "\n <!-- Mirrors in the same network (%s): -->\n", + (strcmp(prefix, "--") == 0) ? "unknown" : prefix); mirrorp = (mirror_entry_t **)mirrors_same_prefix->elts; for (i = 0; i < mirrors_same_prefix->nelts; i++) { if (pref) pref--; _at_@ -1624,7 +1625,8 @@ mirror->baseurl, filename); } - ap_rprintf(r, "\n <!-- Mirrors in the same AS (%s): -->\n", as); + ap_rprintf(r, "\n <!-- Mirrors in the same AS (%s): -->\n", + (strcmp(as, "--") == 0) ? "unknown" : as); mirrorp = (mirror_entry_t **)mirrors_same_as->elts; for (i = 0; i < mirrors_same_as->nelts; i++) { if (pref) pref--; _______________________________________________ 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.orgReceived on Tue Feb 24 2009 - 16:33:26 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT