mirror of https://github.com/BOINC/boinc.git
- client and API: pass "network suspended" flag from client to app;
make it available as part of BOINC_STATUS svn path=/trunk/boinc/; revision=23243
This commit is contained in:
parent
4a4a43790e
commit
02e7aa6678
|
@ -458,6 +458,7 @@ int boinc_get_status(BOINC_STATUS *s) {
|
|||
s->abort_request = boinc_status.abort_request;
|
||||
s->working_set_size = boinc_status.working_set_size;
|
||||
s->max_working_set_size = boinc_status.max_working_set_size;
|
||||
s->network_suspended = boinc_status.network_suspended;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -722,8 +723,10 @@ int restore_activities() {
|
|||
static void handle_heartbeat_msg() {
|
||||
char buf[MSG_CHANNEL_SIZE];
|
||||
double dtemp;
|
||||
bool btemp;
|
||||
|
||||
if (app_client_shm->shm->heartbeat.get_msg(buf)) {
|
||||
boinc_status.network_suspended = false;
|
||||
if (match_tag(buf, "<heartbeat/>")) {
|
||||
heartbeat_giveup_time = interrupt_count + HEARTBEAT_GIVEUP_COUNT;
|
||||
}
|
||||
|
@ -733,6 +736,9 @@ static void handle_heartbeat_msg() {
|
|||
if (parse_double(buf, "<max_wss>", dtemp)) {
|
||||
boinc_status.max_working_set_size = dtemp;
|
||||
}
|
||||
if (parse_bool(buf, "suspend_network", btemp)) {
|
||||
boinc_status.network_suspended = btemp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ typedef struct BOINC_STATUS {
|
|||
int abort_request;
|
||||
double working_set_size;
|
||||
double max_working_set_size;
|
||||
int network_suspended;
|
||||
} BOINC_STATUS;
|
||||
|
||||
typedef void (*FUNC_PTR)();
|
||||
|
|
|
@ -1691,3 +1691,14 @@ Bernd 18 Mar 2011
|
|||
|
||||
sched/
|
||||
sched_locality.cpp
|
||||
|
||||
David 20 Mar 2011
|
||||
- client and API: pass "network suspended" flag from client to app;
|
||||
make it available as part of BOINC_STATUS
|
||||
|
||||
api/
|
||||
boinc_api.cpp,h
|
||||
html/inc/
|
||||
uotd.inc
|
||||
client/
|
||||
app_control.cpp
|
||||
|
|
|
@ -520,6 +520,9 @@ void ACTIVE_TASK_SET::send_heartbeats() {
|
|||
"<max_wss>%e</max_wss>",
|
||||
atp->procinfo.working_set_size, ar
|
||||
);
|
||||
if (gstate.network_suspended) {
|
||||
strcat(buf, "<network_suspended/>");
|
||||
}
|
||||
bool sent = atp->app_client_shm.shm->heartbeat.send_msg(buf);
|
||||
if (log_flags.app_msg_send) {
|
||||
if (sent) {
|
||||
|
|
|
@ -87,7 +87,7 @@ function select_uotd() {
|
|||
"The pool of approved candidates for User of the Day has".
|
||||
" reached your assigned threshold: there are now only " . mysql_num_rows($result) . " approved users.\n\n".
|
||||
"To approve more candidates for User of the Day,".
|
||||
" go to the " . PROJECT . " administration page and click \"Unrated profile\""
|
||||
" go to the " . PROJECT . " administration page and click \"Screen user profiles\""
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue