diff --git a/api/boinc_api.cpp b/api/boinc_api.cpp
index 168cc90477..49eb1a7535 100644
--- a/api/boinc_api.cpp
+++ b/api/boinc_api.cpp
@@ -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_giveup_time = interrupt_count + HEARTBEAT_GIVEUP_COUNT;
}
@@ -733,6 +736,9 @@ static void handle_heartbeat_msg() {
if (parse_double(buf, "", dtemp)) {
boinc_status.max_working_set_size = dtemp;
}
+ if (parse_bool(buf, "suspend_network", btemp)) {
+ boinc_status.network_suspended = btemp;
+ }
}
}
diff --git a/api/boinc_api.h b/api/boinc_api.h
index d8b9f154c7..3068cccc05 100644
--- a/api/boinc_api.h
+++ b/api/boinc_api.h
@@ -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)();
diff --git a/checkin_notes b/checkin_notes
index 986a8ebfb8..d1d4511386 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -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
diff --git a/client/app_control.cpp b/client/app_control.cpp
index 7a0ce6b876..623eefeef8 100644
--- a/client/app_control.cpp
+++ b/client/app_control.cpp
@@ -520,6 +520,9 @@ void ACTIVE_TASK_SET::send_heartbeats() {
"%e",
atp->procinfo.working_set_size, ar
);
+ if (gstate.network_suspended) {
+ strcat(buf, "");
+ }
bool sent = atp->app_client_shm.shm->heartbeat.send_msg(buf);
if (log_flags.app_msg_send) {
if (sent) {
diff --git a/html/inc/uotd.inc b/html/inc/uotd.inc
index 848fd184a4..96d5878e71 100644
--- a/html/inc/uotd.inc
+++ b/html/inc/uotd.inc
@@ -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\""
);
}