mirror of https://github.com/BOINC/boinc.git
- make "needs network" a property of APP_VERSION rather than APP
svn path=/trunk/boinc/; revision=24900
This commit is contained in:
parent
b003b8e290
commit
c28a4ef659
|
@ -9529,3 +9529,10 @@ David 26 Dec 2011
|
|||
gui_rpc_client.h
|
||||
gui_rpc_client_ops.cpp
|
||||
|
||||
David 26 Dec 2011
|
||||
- make "needs network" a property of APP_VERSION rather than APP
|
||||
|
||||
client/
|
||||
client_types.cpp,h
|
||||
work_fetch.cpp
|
||||
app_control.cpp
|
||||
|
|
|
@ -1194,7 +1194,6 @@ void ACTIVE_TASK::get_graphics_msg() {
|
|||
if (app_client_shm.shm->graphics_reply.get_msg(msg_buf)) {
|
||||
parse_str(msg_buf, "<web_graphics_url>", web_graphics_url, sizeof(web_graphics_url));
|
||||
}
|
||||
strcpy(web_graphics_url, "http://google.com");
|
||||
}
|
||||
|
||||
bool ACTIVE_TASK::get_trickle_up_msg() {
|
||||
|
|
|
@ -782,12 +782,10 @@ void PROJECT::update_project_files_downloaded_time() {
|
|||
}
|
||||
|
||||
int APP::parse(XML_PARSER& xp) {
|
||||
|
||||
strcpy(name, "");
|
||||
strcpy(user_friendly_name, "");
|
||||
project = NULL;
|
||||
non_cpu_intensive = false;
|
||||
needs_network = false;
|
||||
while (!xp.get_tag()) {
|
||||
if (xp.match_tag("/app")) {
|
||||
if (!strlen(user_friendly_name)) {
|
||||
|
@ -811,7 +809,6 @@ int APP::parse(XML_PARSER& xp) {
|
|||
continue;
|
||||
}
|
||||
if (xp.parse_bool("non_cpu_intensive", non_cpu_intensive)) continue;
|
||||
if (xp.parse_bool("needs_network", needs_network)) continue;
|
||||
#endif
|
||||
if (log_flags.unparsed_xml) {
|
||||
msg_printf(0, MSG_INFO,
|
||||
|
@ -830,11 +827,9 @@ int APP::write(MIOFILE& out) {
|
|||
" <name>%s</name>\n"
|
||||
" <user_friendly_name>%s</user_friendly_name>\n"
|
||||
" <non_cpu_intensive>%d</non_cpu_intensive>\n"
|
||||
" <needs_network>%d</needs_network>\n"
|
||||
"</app>\n",
|
||||
name, user_friendly_name,
|
||||
non_cpu_intensive?1:0,
|
||||
needs_network?1:0
|
||||
non_cpu_intensive?1:0
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1297,6 +1292,7 @@ int APP_VERSION::parse(XML_PARSER& xp) {
|
|||
missing_coproc = false;
|
||||
strcpy(missing_coproc_name, "");
|
||||
dont_throttle = false;
|
||||
needs_network = false;
|
||||
|
||||
while (!xp.get_tag()) {
|
||||
if (xp.match_tag("/app_version")) return 0;
|
||||
|
@ -1344,6 +1340,7 @@ int APP_VERSION::parse(XML_PARSER& xp) {
|
|||
continue;
|
||||
}
|
||||
if (xp.parse_bool("dont_throttle", dont_throttle)) continue;
|
||||
if (xp.parse_bool("needs_network", needs_network)) continue;
|
||||
if (log_flags.unparsed_xml) {
|
||||
msg_printf(0, MSG_INFO,
|
||||
"[unparsed_xml] APP_VERSION::parse(): unrecognized: %s\n",
|
||||
|
@ -1425,6 +1422,11 @@ int APP_VERSION::write(MIOFILE& out, bool write_file_info) {
|
|||
" <dont_throttle/>\n"
|
||||
);
|
||||
}
|
||||
if (needs_network) {
|
||||
out.printf(
|
||||
" <needs_network/>\n"
|
||||
);
|
||||
}
|
||||
|
||||
out.printf(
|
||||
"</app_version>\n"
|
||||
|
@ -1939,7 +1941,7 @@ int RESULT::write_gui(MIOFILE& out) {
|
|||
if (edf_scheduled) out.printf(" <edf_scheduled/>\n");
|
||||
if (coproc_missing) out.printf(" <coproc_missing/>\n");
|
||||
if (schedule_backoff > gstate.now) out.printf(" <scheduler_wait/>\n");
|
||||
if (avp->app->needs_network && gstate.network_suspended) out.printf(" <network_wait/>\n");
|
||||
if (avp->needs_network && gstate.network_suspended) out.printf(" <network_wait/>\n");
|
||||
ACTIVE_TASK* atp = gstate.active_tasks.lookup_result(this);
|
||||
if (atp) {
|
||||
atp->write_gui(out);
|
||||
|
|
|
@ -543,7 +543,6 @@ struct APP {
|
|||
char name[256];
|
||||
char user_friendly_name[256];
|
||||
bool non_cpu_intensive;
|
||||
bool needs_network;
|
||||
PROJECT* project;
|
||||
#ifdef SIM
|
||||
double latency_bound;
|
||||
|
@ -581,6 +580,7 @@ struct APP_VERSION {
|
|||
char file_prefix[256];
|
||||
// prepend this to input/output file logical names
|
||||
// (e.g. "share" for VM apps)
|
||||
bool needs_network;
|
||||
|
||||
APP* app;
|
||||
PROJECT* project;
|
||||
|
|
|
@ -959,7 +959,7 @@ bool RESULT::runnable() {
|
|||
if (state() != RESULT_FILES_DOWNLOADED) return false;
|
||||
if (coproc_missing) return false;
|
||||
if (schedule_backoff > gstate.now) return false;
|
||||
if (avp->app->needs_network && gstate.network_suspended) return false;
|
||||
if (avp->needs_network && gstate.network_suspended) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue