global prefs

svn path=/trunk/boinc/; revision=2074
This commit is contained in:
Administrator 2003-08-13 20:00:20 +00:00
parent c89193e29d
commit a016bc65ea
2 changed files with 20 additions and 3 deletions

View File

@ -5666,3 +5666,10 @@ Karl 2003/08/12
sched/
handle_request.C
Chrisz 2003/8/13
- if get either new global prefs OR new venue,
parse and install prefs
client/
cs_scheduler.C

View File

@ -373,7 +373,7 @@ int CLIENT_STATE::handle_scheduler_reply(
FILE* f;
int retval;
unsigned int i;
bool signature_valid;
bool signature_valid,need_to_install_prefs=false;
char buf[256];
nresults = 0;
@ -420,6 +420,12 @@ int CLIENT_STATE::handle_scheduler_reply(
project->rpc_seqno = 0;
}
if (strcmp(host_venue, sr.host_venue)) {
safe_strcpy(host_venue, sr.host_venue);
need_to_install_prefs = true;
}
// if the scheduler reply includes global preferences,
// insert extra elements, write to disk, and parse
//
@ -436,8 +442,12 @@ int CLIENT_STATE::handle_scheduler_reply(
scheduler_url,
sr.global_prefs_xml
);
fclose(f);
safe_strcpy(host_venue, sr.host_venue);
fclose(f);
need_to_install_prefs = true;
}
if (need_to_install_prefs) {
retval = global_prefs.parse_file(host_venue);
if (retval) return retval;
install_global_prefs();