Merge branch 'master' of ssh://boinc.berkeley.edu/boinc-v2

This commit is contained in:
David Anderson 2014-11-10 21:53:36 -08:00
commit b81c686a59
4 changed files with 24 additions and 12 deletions

View File

@ -92,6 +92,12 @@ int APP_VERSION_CONFIG::parse(XML_PARSER& xp, PROJECT* p) {
memset(this, 0, sizeof(APP_VERSION_CONFIG));
while (!xp.get_tag()) {
if (!xp.is_tag) {
msg_printf_notice(p, false, NULL,
"unexpected text '%s' in app_config.xml", xp.parsed_tag
);
return ERR_XML_PARSE;
}
if (xp.match_tag("/app_version")) return 0;
if (xp.parse_str("app_name", app_name, 256)) continue;
if (xp.parse_str("plan_class", plan_class, 256)) continue;
@ -117,6 +123,12 @@ int APP_CONFIGS::parse(XML_PARSER& xp, PROJECT* p) {
app_configs.clear();
if (!xp.parse_start("app_config")) return ERR_XML_PARSE;
while (!xp.get_tag()) {
if (!xp.is_tag) {
msg_printf_notice(p, false, NULL,
"unexpected text '%s' in app_config.xml", xp.parsed_tag
);
return ERR_XML_PARSE;
}
if (xp.match_tag("/app_config")) return 0;
if (xp.match_tag("app")) {
APP_CONFIG ac;

View File

@ -463,8 +463,9 @@ void CLIENT_STATE::check_suspend_network() {
}
#ifndef ANDROID
// allow network transfers while user active, i.e. screen on.
// otherwise nothing (visible to the user) happens after intial attach
// allow network transfers while user active, i.e. screen on.
// otherwise nothing (visible to the user) happens after initial attach
//
if (!global_prefs.run_if_user_active && user_active) {
file_xfers_suspended = true;
if (!recent_rpc) network_suspended = true;

View File

@ -532,7 +532,12 @@ bool RESULT::runnable() {
if (state() != RESULT_FILES_DOWNLOADED) return false;
if (coproc_missing) return false;
if (schedule_backoff > gstate.now) return false;
if (avp->needs_network && gstate.network_suspended) return false;
if (avp->needs_network && gstate.file_xfers_suspended) {
// check file_xfers_suspended rather than network_suspended;
// the latter remains false for a period after GUI RPCs
//
return false;
}
return true;
}

View File

@ -2503,15 +2503,9 @@ wxString result_description(RESULT* result, bool show_resources) {
} else if (status.task_suspend_reason && !throttled) {
strBuffer += _("Suspended - ");
strBuffer += suspend_reason_wxstring(status.task_suspend_reason);
if (strlen(result->resources) && show_resources) {
strBuffer += wxString(wxT(" (")) + wxString(result->resources, wxConvUTF8) + wxString(wxT(")"));
}
} else if (status.gpu_suspend_reason && uses_gpu(result)) {
strBuffer += _("GPU suspended - ");
strBuffer += suspend_reason_wxstring(status.gpu_suspend_reason);
if (strlen(result->resources) && show_resources) {
strBuffer += wxString(wxT(" (")) + wxString(result->resources, wxConvUTF8) + wxString(wxT(")"));
}
} else if (result->active_task) {
if (result->too_large) {
strBuffer += _("Waiting for memory");
@ -2527,9 +2521,6 @@ wxString result_description(RESULT* result, bool show_resources) {
} else if (result->scheduler_state == CPU_SCHED_UNINITIALIZED) {
strBuffer += _("Ready to start");
}
if (strlen(result->resources)>1 && show_resources) {
strBuffer += wxString(wxT(" (")) + wxString(result->resources, wxConvUTF8) + wxString(wxT(")"));
}
} else {
strBuffer += _("Ready to start");
}
@ -2594,6 +2585,9 @@ wxString result_description(RESULT* result, bool show_resources) {
}
break;
}
if (strlen(result->resources)>1 && show_resources) {
strBuffer += wxString(wxT(" (")) + wxString(result->resources, wxConvUTF8) + wxString(wxT(")"));
}
return strBuffer;
}