Silently skip tags client_version_check_url, client_download_url and client_new_version_text in cc_config.xml if an older client has written them there.

The Manager dialogs Event Log options and Exclusive Applications write the entire set of tags, so these tags typically contained the default values.
This commit is contained in:
Charlie Fenton 2018-07-15 18:53:25 -07:00
parent fc02420dd4
commit 0e7c376406
2 changed files with 16 additions and 0 deletions

View File

@ -457,6 +457,14 @@ int CC_CONFIG::parse_options_client(XML_PARSER& xp) {
if (xp.parse_bool("use_certs_only", use_certs_only)) continue;
if (xp.parse_bool("vbox_window", vbox_window)) continue;
// The following 3 tags have been moved to nvc_config and
// NVC_CONFIG_FILE, but CC_CONFIG::write() in older clients
// may have written their default values to CONFIG_FILE.
// Silently skip them if present.
if (xp.parse_string("client_download_url", s)) continue;
if (xp.parse_string("client_new_version_text", s)) continue;
if (xp.parse_string("client_version_check_url", s)) continue;
msg_printf_notice(NULL, false,
"https://boinc.berkeley.edu/manager_links.php?target=notice&controlid=config",
"%s: <%s>",

View File

@ -435,6 +435,14 @@ int CC_CONFIG::parse_options(XML_PARSER& xp) {
if (xp.parse_bool("use_certs_only", use_certs_only)) continue;
if (xp.parse_bool("vbox_window", vbox_window)) continue;
// The following 3 tags have been moved to nvc_config and
// NVC_CONFIG_FILE, but CC_CONFIG::write() in older clients
// may have written their default values to CONFIG_FILE.
// Silently skip them if present.
if (xp.parse_string("client_download_url", s)) continue;
if (xp.parse_string("client_new_version_text", s)) continue;
if (xp.parse_string("client_version_check_url", s)) continue;
xp.skip_unexpected(true, "CC_CONFIG::parse_options");
}
return ERR_XML_PARSE;