*** empty log message ***

svn path=/trunk/boinc/; revision=4156
This commit is contained in:
David Anderson 2004-09-05 18:51:41 +00:00
parent aaefb03ba9
commit 0b8db98a17
3 changed files with 29 additions and 3 deletions

View File

@ -411,6 +411,8 @@ int GUI_RPC_CONN::handle_rpc() {
handle_get_run_mode(request_msg, mf);
} else if (match_tag(request_msg, "<set_network_mode>")) {
handle_set_network_mode(request_msg, mf);
} else if (match_tag(request_msg, "<get_network_mode>")) {
handle_get_network_mode(request_msg, mf);
} else if (match_tag(request_msg, "<run_benchmarks")) {
handle_run_benchmarks(request_msg, mf);
} else if (match_tag(request_msg, "<set_proxy_settings>")) {

View File

@ -407,11 +407,13 @@ int RPC_CLIENT::get_run_mode(int& mode) {
MIOFILE fin;
fin.init_buf(mbuf);
mode = -1;
while (fin.fgets(buf, 256)) {
if (match_tag(buf, mode_name(RUN_MODE_ALWAYS))) return RUN_MODE_ALWAYS;
if (match_tag(buf, mode_name(RUN_MODE_NEVER))) return RUN_MODE_NEVER;
if (match_tag(buf, mode_name(RUN_MODE_AUTO))) return RUN_MODE_AUTO;
if (match_tag(buf, mode_name(RUN_MODE_ALWAYS))) mode = RUN_MODE_ALWAYS;
if (match_tag(buf, mode_name(RUN_MODE_NEVER))) mode = RUN_MODE_NEVER;
if (match_tag(buf, mode_name(RUN_MODE_AUTO))) mode = RUN_MODE_AUTO;
}
return 0;
}
int RPC_CLIENT::set_network_mode(int mode) {
@ -433,6 +435,27 @@ int RPC_CLIENT::set_network_mode(int mode) {
return 0;
}
int RPC_CLIENT::get_network_mode(int& mode) {
char buf[256];
char* mbuf=0;
int retval;
retval = send_request("<get_network_mode/>\n");
if (retval) return retval;
retval = get_reply(mbuf);
if (retval) return retval;
MIOFILE fin;
fin.init_buf(mbuf);
mode = -1;
while (fin.fgets(buf, 256)) {
if (match_tag(buf, mode_name(RUN_MODE_ALWAYS))) mode = RUN_MODE_ALWAYS;
if (match_tag(buf, mode_name(RUN_MODE_NEVER))) mode = RUN_MODE_NEVER;
if (match_tag(buf, mode_name(RUN_MODE_AUTO))) mode = RUN_MODE_AUTO;
}
return 0;
}
int RPC_CLIENT::run_benchmarks() {
char buf[256];
char* mbuf=0;

View File

@ -201,6 +201,7 @@ public:
int set_run_mode(int mode);
int get_run_mode(int& mode);
int set_network_mode(int mode);
int get_network_mode(int& mode);
int run_benchmarks();
int set_proxy_settings(PROXY_INFO&);
int get_messages(int nmessages, int seqno, std::vector<MESSAGE_DESC>&);