diff --git a/checkin_notes b/checkin_notes
index e9c31223c1..de4ed4b65a 100755
--- a/checkin_notes
+++ b/checkin_notes
@@ -2981,3 +2981,17 @@ Rom 17 Mar 2006
win_build/installerv2
BOINC.ism
+
+David 17 Mar 2006
+ - Add optional tag in 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 in the element for one of
+ the projects to which prefs were successfully sent.
+
+ client/
+ acct_mgr.C,h
+ doc/
+ acct_mgt.php
diff --git a/client/acct_mgr.C b/client/acct_mgr.C
index 9e8de430a5..4fe9707d64 100644
--- a/client/acct_mgr.C
+++ b/client/acct_mgr.C
@@ -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)) 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; iattached_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;
diff --git a/client/acct_mgr.h b/client/acct_mgr.h
index fad3f6155b..ca4cbf3e17 100644
--- a/client/acct_mgr.h
+++ b/client/acct_mgr.h
@@ -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() {}
diff --git a/doc/acct_mgt.php b/doc/acct_mgt.php
index 4b7241dbf3..00449431ed 100644
--- a/doc/acct_mgt.php
+++ b/doc/acct_mgt.php
@@ -239,6 +239,7 @@ f72103eb0995be77cac54f253c0ba639a814d3293646ae11894e9d1367a98790
.
KEY
+ [ ]
[ ]
...
@@ -294,6 +295,9 @@ list_item("action",
The account's authenticator.
detach
If present, the client should detach this project.
+ update
+ If present, the client should contact this project
+ to get new global preferences.
NOTE: the XML must be as above, with the <url>
and <authenticator> elements on a single line,
diff --git a/doc/index.php b/doc/index.php
index 0702db15af..f51350c787 100644
--- a/doc/index.php
+++ b/doc/index.php
@@ -4,8 +4,9 @@ require_once("boinc_news.inc");
require_once("../html/inc/news.inc");
$projects = array(
- "Climateprediction.net
- and BBC Climate Change Experiment:
+ "Climateprediction.net,
+ BBC Climate Change Experiment,
+ and Seasonal Attribution Project:
study climate change.",
"Einstein@home:
search for gravitational signals emitted by pulsars.",