mirror of https://github.com/BOINC/boinc.git
AMS can tell client to update
svn path=/trunk/boinc/; revision=9682
This commit is contained in:
parent
0c69d7cac0
commit
a1ac47381b
|
@ -2981,3 +2981,17 @@ Rom 17 Mar 2006
|
|||
|
||||
win_build/installerv2
|
||||
BOINC.ism
|
||||
|
||||
David 17 Mar 2006
|
||||
- Add optional <update/> tag in <account> elements
|
||||
of account manager replies.
|
||||
This tells the core client to do a scheduler RPC to the project.
|
||||
The account manager should set this when it has updated prefs
|
||||
and wants the core client to get them;
|
||||
put <update/> in the <account> element for one of
|
||||
the projects to which prefs were successfully sent.
|
||||
|
||||
client/
|
||||
acct_mgr.C,h
|
||||
doc/
|
||||
acct_mgt.php
|
||||
|
|
|
@ -166,6 +166,7 @@ int AM_ACCOUNT::parse(FILE* f) {
|
|||
int retval;
|
||||
|
||||
detach = false;
|
||||
update = false;
|
||||
url = "";
|
||||
strcpy(url_signature, "");
|
||||
authenticator = "";
|
||||
|
@ -188,6 +189,7 @@ int AM_ACCOUNT::parse(FILE* f) {
|
|||
}
|
||||
if (parse_str(buf, "<authenticator>", authenticator)) continue;
|
||||
if (parse_bool(buf, "detach", detach)) continue;
|
||||
if (parse_bool(buf, "update", update)) continue;
|
||||
}
|
||||
return ERR_XML_PARSE;
|
||||
}
|
||||
|
@ -312,30 +314,28 @@ void ACCT_MGR_OP::handle_reply(int http_op_retval) {
|
|||
} else {
|
||||
msg_printf(pp, MSG_INFO, "Already attached");
|
||||
pp->attached_via_acct_mgr = true;
|
||||
|
||||
// initiate a scheduler RPC if requested by AMS
|
||||
//
|
||||
if (acct.update) {
|
||||
pp->sched_rpc_pending = true;
|
||||
pp->min_rpc_time = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!acct.detach) {
|
||||
msg_printf(NULL, MSG_INFO, "Attaching to %s", acct.url.c_str());
|
||||
gstate.add_project(acct.url.c_str(), acct.authenticator.c_str(), true);
|
||||
msg_printf(NULL, MSG_INFO,
|
||||
"Attaching to %s", acct.url.c_str()
|
||||
);
|
||||
gstate.add_project(
|
||||
acct.url.c_str(), acct.authenticator.c_str(), true
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Do a scheduler RPC to some AMS-managed project,
|
||||
// to get new preferences if any.
|
||||
// This is a kludge.
|
||||
// Would be nice to do this only if prefs have actually changed.
|
||||
//
|
||||
for (i=0; i<gstate.projects.size(); i++) {
|
||||
PROJECT* p = gstate.projects[i];
|
||||
if (p->attached_via_acct_mgr && p->min_rpc_time==0) {
|
||||
p->sched_rpc_pending = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
strcpy(gstate.acct_mgr_info.previous_host_cpid, gstate.host_info.host_cpid);
|
||||
if (repeat_sec) {
|
||||
gstate.acct_mgr_info.next_rpc_time = gstate.now + repeat_sec;
|
||||
|
|
|
@ -62,6 +62,7 @@ struct AM_ACCOUNT {
|
|||
std::string authenticator;
|
||||
char url_signature[MAX_SIGNATURE_LEN];
|
||||
bool detach;
|
||||
bool update;
|
||||
|
||||
int parse(FILE*);
|
||||
AM_ACCOUNT() {}
|
||||
|
|
|
@ -239,6 +239,7 @@ f72103eb0995be77cac54f253c0ba639a814d3293646ae11894e9d1367a98790
|
|||
.
|
||||
</url_signature>
|
||||
<authenticator>KEY</authenticator>
|
||||
[ <update/> ]
|
||||
[ <detach/> ]
|
||||
</account>
|
||||
...
|
||||
|
@ -294,6 +295,9 @@ list_item("action",
|
|||
<dd>The account's authenticator.
|
||||
<dt>detach
|
||||
<dd>If present, the client should detach this project.
|
||||
<dt>update
|
||||
<dd>If present, the client should contact this project
|
||||
to get new global preferences.
|
||||
</dl>
|
||||
NOTE: the XML must be as above, with the <url>
|
||||
and <authenticator> elements on a single line,
|
||||
|
|
|
@ -4,8 +4,9 @@ require_once("boinc_news.inc");
|
|||
require_once("../html/inc/news.inc");
|
||||
|
||||
$projects = array(
|
||||
"<a href=http://climateprediction.net>Climateprediction.net</a>
|
||||
and <a href=http://bbc.cpdn.org>BBC Climate Change Experiment</a>:
|
||||
"<a href=http://climateprediction.net>Climateprediction.net</a>,
|
||||
<a href=http://bbc.cpdn.org>BBC Climate Change Experiment</a>,
|
||||
and <a href=http://attribution.cpdn.org/>Seasonal Attribution Project</a>:
|
||||
study climate change.",
|
||||
"<a href=http://einstein.phys.uwm.edu/>Einstein@home</a>:
|
||||
search for gravitational signals emitted by pulsars.",
|
||||
|
|
Loading…
Reference in New Issue