*** empty log message ***

svn path=/trunk/boinc/; revision=9147
This commit is contained in:
David Anderson 2005-12-25 04:53:24 +00:00
parent 4d9a7a3981
commit f3d1e4e71d
4 changed files with 51 additions and 33 deletions

View File

@ -14801,3 +14801,12 @@ David 23 Dec 2005
gui_rpc_server.C,h
gui_rpc_server_ops.C
ss_logic.C
David 24 Dec 2005
- amended yesterday's changes so that only user-initiated RPCs
(e.g. to attach/detach/suspend/resume a project or result) are counted.
Otherwise the preferences would never kick in.
client/
gui_rpc_server.C,h
gui_rpc_server_ops.C

View File

@ -337,7 +337,6 @@ void GUI_RPC_CONN_SET::got_select(FDSET_GROUP& fg) {
while (iter != gui_rpcs.end()) {
gr = *iter;
if (FD_ISSET(gr->sock, &fg.read_fds)) {
last_rpc_time = gstate.now;
retval = gr->handle_rpc();
if (retval) {
delete gr;

View File

@ -41,13 +41,16 @@ public:
class GUI_RPC_CONN_SET {
std::vector<GUI_RPC_CONN*> gui_rpcs;
std::vector<int> allowed_remote_ip_addresses;
double last_rpc_time;
int get_allowed_hosts();
int get_password();
int insert(GUI_RPC_CONN*);
public:
int lsock;
double last_rpc_time;
// actually, the last time of a project or result op
// (ones that are triggered by a user action,
// rather than by the Manager itself)
GUI_RPC_CONN_SET();
char password[256];
void get_fdset(FDSET_GROUP&, FDSET_GROUP&);

View File

@ -824,20 +824,6 @@ int GUI_RPC_CONN::handle_rpc() {
handle_get_project_status(mf);
} else if (match_tag(request_msg, "<get_disk_usage")) {
handle_get_disk_usage(mf);
} else if (match_tag(request_msg, "<result_show_graphics")) {
handle_result_show_graphics(request_msg, mf);
} else if (match_tag(request_msg, "<project_reset")) {
handle_project_op(request_msg, mf, "reset");
} else if (match_tag(request_msg, "<project_detach")) {
handle_project_op(request_msg, mf, "detach");
} else if (match_tag(request_msg, "<project_update")) {
handle_project_op(request_msg, mf, "update");
} else if (match_tag(request_msg, "<project_suspend")) {
handle_project_op(request_msg, mf, "suspend");
} else if (match_tag(request_msg, "<project_resume")) {
handle_project_op(request_msg, mf, "resume");
} else if (match_tag(request_msg, "<set_run_mode")) {
handle_set_run_mode(request_msg, mf);
} else if (match_tag(request_msg, "<project_nomorework")) {
handle_project_op(request_msg, mf, "nomorework");
} else if (match_tag(request_msg, "<project_allowmorework")) {
@ -858,28 +844,51 @@ int GUI_RPC_CONN::handle_rpc() {
handle_get_activity_state(request_msg, mf);
} else if (match_tag(request_msg, "<get_messages")) {
handle_get_messages(request_msg, mf);
} else if (match_tag(request_msg, "<retry_file_transfer")) {
handle_file_transfer_op(request_msg, mf, "retry");
} else if (match_tag(request_msg, "<abort_file_transfer")) {
handle_file_transfer_op(request_msg, mf, "abort");
} else if (match_tag(request_msg, "<abort_result")) {
handle_result_op(request_msg, mf, "abort");
} else if (match_tag(request_msg, "<suspend_result")) {
handle_result_op(request_msg, mf, "suspend");
} else if (match_tag(request_msg, "<resume_result")) {
handle_result_op(request_msg, mf, "resume");
} else if (match_tag(request_msg, "<get_host_info")) {
handle_get_host_info(request_msg, mf);
} else if (match_tag(request_msg, "<quit")) {
handle_quit(request_msg, mf);
} else if (match_tag(request_msg, "<acct_mgr_info")) {
handle_acct_mgr_info(request_msg, mf);
} else if (match_tag(request_msg, "<get_statistics")) {
handle_get_statistics(request_msg, mf);
} else if (match_tag(request_msg, "<network_query")) {
handle_network_query(request_msg, mf);
} else if (match_tag(request_msg, "<network_available")) {
handle_network_available(request_msg, mf);
} else if (match_tag(request_msg, "<get_newer_version>")) {
handle_get_newer_version(mf);
}
// RPCs that reflect user actions go after here
//
gstate.gui_rpcs.last_rpc_time = gstate.now;
if (match_tag(request_msg, "<retry_file_transfer")) {
handle_file_transfer_op(request_msg, mf, "retry");
} else if (match_tag(request_msg, "<abort_file_transfer")) {
handle_file_transfer_op(request_msg, mf, "abort");
} else if (match_tag(request_msg, "<project_reset")) {
handle_project_op(request_msg, mf, "reset");
} else if (match_tag(request_msg, "<project_detach")) {
handle_project_op(request_msg, mf, "detach");
} else if (match_tag(request_msg, "<project_update")) {
handle_project_op(request_msg, mf, "update");
} else if (match_tag(request_msg, "<abort_result")) {
handle_result_op(request_msg, mf, "abort");
} else if (match_tag(request_msg, "<suspend_result")) {
handle_result_op(request_msg, mf, "suspend");
} else if (match_tag(request_msg, "<resume_result")) {
handle_result_op(request_msg, mf, "resume");
} else if (match_tag(request_msg, "<result_show_graphics")) {
handle_result_show_graphics(request_msg, mf);
} else if (match_tag(request_msg, "<project_suspend")) {
handle_project_op(request_msg, mf, "suspend");
} else if (match_tag(request_msg, "<project_resume")) {
handle_project_op(request_msg, mf, "resume");
} else if (match_tag(request_msg, "<set_run_mode")) {
handle_set_run_mode(request_msg, mf);
} else if (match_tag(request_msg, "<quit")) {
handle_quit(request_msg, mf);
} else if (match_tag(request_msg, "<acct_mgr_info")) {
handle_acct_mgr_info(request_msg, mf);
} else if (match_tag(request_msg, "<get_project_init_status")) {
handle_get_project_init_status(request_msg, mf);
} else if (match_tag(request_msg, "<get_project_config>")) {
@ -906,8 +915,6 @@ int GUI_RPC_CONN::handle_rpc() {
handle_acct_mgr_rpc(request_msg, mf);
} else if (match_tag(request_msg, "<acct_mgr_rpc_poll")) {
handle_acct_mgr_rpc_poll(request_msg, mf);
} else if (match_tag(request_msg, "<get_newer_version>")) {
handle_get_newer_version(mf);
} else {
mf.printf("<error>unrecognized op</error>\n");
}