unrecognized op\n");
diff --git a/html/user/sample_index.php b/html/user/sample_index.php
index 2f12e0e67d..25fffcfb77 100644
--- a/html/user/sample_index.php
+++ b/html/user/sample_index.php
@@ -22,12 +22,11 @@ function show_nav() {
You can participate by downloading and running a free program
on your computer.
- XXX is based at research lab of Professor XXX
- at the University of XXX.
+ XXX is based at
+ [describe your institution, with link to web page]
Join ".PROJECT."
Community
diff --git a/lib/boinc_cmd.C b/lib/boinc_cmd.C
index 8ab029c70e..faceeb0d84 100644
--- a/lib/boinc_cmd.C
+++ b/lib/boinc_cmd.C
@@ -95,6 +95,7 @@ Commands:\n\
--read_cc_config\n\
--network_available\n\
--get_cc_status\n\
+ --set_debts URL1 std1 ltd1 [URL2 std2 ltd2 ...]\n\
--quit\n"
);
exit(1);
@@ -498,40 +499,27 @@ int main(int argc, char** argv) {
retval = rpc.read_global_prefs_override();
} else if (!strcmp(cmd, "--read_cc_config")) {
retval = rpc.read_cc_config();
- } else if (!strcmp(cmd, "--test1")) {
- string s;
- retval = rpc.get_global_prefs_override(s);
- printf("retval: %d\nprefs:\n%s\n", retval, s.c_str());
- } else if (!strcmp(cmd, "--test2")) {
- string s = "foobar";
- retval = rpc.set_global_prefs_override(s);
- printf("retval: %d\n", retval);
- } else if (!strcmp(cmd, "--test3")) {
- GLOBAL_PREFS gp;
- GLOBAL_PREFS_MASK mask;
- memset(&gp, 0, sizeof(gp));
- mask.clear();
- retval = rpc.get_global_prefs_override_struct(gp, mask);
- printf("retval %d max %d\n", retval, gp.max_cpus);
- } else if (!strcmp(cmd, "--test4")) {
- GLOBAL_PREFS gp;
- GLOBAL_PREFS_MASK m;
- gp.max_cpus = 2;
- m.max_cpus = true;
- retval = rpc.set_global_prefs_override_struct(gp, m);
printf("retval %d\n", retval);
- } else if (!strcmp(cmd, "--quit")) {
- retval = rpc.quit();
- } else if (!strcmp(cmd, "read_cc_config")) {
- retval = rpc.read_cc_config();
- } else if (!strcmp(cmd, "network_available")) {
+ } else if (!strcmp(cmd, "--network_available")) {
retval = rpc.network_available();
- } else if (!strcmp(cmd, "get_cc_status")) {
+ } else if (!strcmp(cmd, "--get_cc_status")) {
CC_STATUS cs;
retval = rpc.get_cc_status(cs);
if (!retval) {
retval = cs.network_status;
}
+ } else if (!strcmp(cmd, "--set_debts")) {
+ vectorprojects;
+ while (i < argc) {
+ PROJECT p;
+ p.master_url = string(next_arg(argc, argv, i));
+ p.short_term_debt = atoi(next_arg(argc, argv, i));
+ p.long_term_debt = atoi(next_arg(argc, argv, i));
+ projects.push_back(p);
+ }
+ retval = rpc.set_debts(projects);
+ } else if (!strcmp(cmd, "--quit")) {
+ retval = rpc.quit();
} else {
fprintf(stderr, "unrecognized command %s\n", cmd);
}
diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h
index ca23d68666..0f2f0a4e47 100644
--- a/lib/gui_rpc_client.h
+++ b/lib/gui_rpc_client.h
@@ -612,6 +612,7 @@ public:
int set_global_prefs_override(std::string&);
int get_global_prefs_override_struct(GLOBAL_PREFS&, GLOBAL_PREFS_MASK&);
int set_global_prefs_override_struct(GLOBAL_PREFS&, GLOBAL_PREFS_MASK&);
+ int set_debts(std::vector);
};
struct RPC {
diff --git a/lib/gui_rpc_client_ops.C b/lib/gui_rpc_client_ops.C
index 9811ec0332..d3f3e4fe09 100644
--- a/lib/gui_rpc_client_ops.C
+++ b/lib/gui_rpc_client_ops.C
@@ -2216,4 +2216,32 @@ int RPC_CLIENT::read_cc_config() {
return retval;
}
+int RPC_CLIENT::set_debts(vector projects) {
+ int retval;
+ SET_LOCALE sl;
+ char buf[64000], buf2[1024];
+ RPC rpc(this);
+ string s;
+
+ s = "\n";
+ for (unsigned int i=0; i\n"
+ " %s\n"
+ " %f\n"
+ " %f\n"
+ " \n",
+ p.master_url.c_str(),
+ p.short_term_debt,
+ p.long_term_debt
+ );
+ s += string(buf2);
+ }
+ s += "
\n";
+ retval = rpc.do_rpc(s.c_str());
+ return retval;
+}
+
+
const char *BOINC_RCSID_90e8b8d168="$Id$";