From 6fbc690dc32de617955ff4b90a41d1788c079b70 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 11 Sep 2000 23:38:48 +0000 Subject: [PATCH] * site.cc (get_initial_list_idx): Don't default to saved URL if it refers to sources. --- ChangeLog | 5 +++++ site.cc | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index b70a483d..371c859c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Sep 11 19:35:24 2000 Christopher Faylor + + * site.cc (get_initial_list_idx): Don't default to saved URL if it + refers to sources. + 2000-09-07 DJ Delorie * splash.cc: use version.h, not local decl diff --git a/site.cc b/site.cc index de6f5f30..ad004310 100644 --- a/site.cc +++ b/site.cc @@ -257,6 +257,15 @@ get_site_list (HINSTANCE h) return 0; } +/* List of machines that should not be used by default when saved + in "last-mirror". */ +#define NOSAVE1 "ftp://sources.redhat.com/" +#define NOSAVE1_LEN (sizeof ("ftp://sources.redhat.com/") - 1) +#define NOSAVE2 "ftp://sourceware.cygnus.com/" +#define NOSAVE2_LEN (sizeof ("ftp://sourceware.cygnus.com/") - 1) +#define NOSAVE3 "ftp://gcc.gnu.org/" +#define NOSAVE3_LEN (sizeof ("ftp://gcc.gnu.org/") - 1) + static void get_initial_list_idx () { @@ -289,6 +298,12 @@ get_initial_list_idx () if (! site_list[i].url) { + /* Don't default to certain machines ever since they suffer + from bandwidth limitations. */ + if (strnicmp (site, NOSAVE1, NOSAVE1_LEN) == 0 + || strnicmp (site, NOSAVE2, NOSAVE2_LEN) == 0 + || strnicmp (site, NOSAVE3, NOSAVE3_LEN) == 0) + return; site_list[i].displayed_url = site_list[i].url = _strdup (site); site_list[i+1].url = 0; -- 2.43.5