diff --git a/checkin_notes b/checkin_notes index af48c59bb8..d4cad64213 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2681,3 +2681,14 @@ David 5 Mar 2009 handle_request.cpp server_types.cpp,h sched_send.cpp + +David 5 Mar 2009 + - client: if using anonymous platform, ignore (and complain about) + app versions in scheduler reply + - client: when reporting anonymous platform apps in sched request, + don't include s (not relevant to server) + + client/ + client_types.cpp,h + cs_scheduler.cpp + cs_statefile.cpp diff --git a/client/client_types.cpp b/client/client_types.cpp index 76a863c4e7..34076f6ac0 100644 --- a/client/client_types.cpp +++ b/client/client_types.cpp @@ -1157,7 +1157,7 @@ int APP_VERSION::parse(MIOFILE& in) { return ERR_XML_PARSE; } -int APP_VERSION::write(MIOFILE& out) { +int APP_VERSION::write(MIOFILE& out, bool write_file_info) { unsigned int i; int retval; @@ -1185,9 +1185,11 @@ int APP_VERSION::write(MIOFILE& out) { if (strlen(cmdline)) { out.printf(" %s\n", cmdline); } - for (i=0; iproject != p) continue; - avp->write(mf); + avp->write(mf, false); } fprintf(f, " \n"); } @@ -700,6 +700,12 @@ int CLIENT_STATE::handle_scheduler_reply(PROJECT* project, char* scheduler_url) } } for (i=0; ianonymous_platform) { + msg_printf(project, MSG_INTERNAL_ERROR, + "App version returned from anonymous platform project; ignoring" + ); + continue; + } APP_VERSION& avpp = sr.app_versions[i]; if (strlen(avpp.platform) == 0) { strcpy(avpp.platform, get_primary_platform()); @@ -712,6 +718,9 @@ int CLIENT_STATE::handle_scheduler_reply(PROJECT* project, char* scheduler_url) } } if (avpp.missing_coproc()) { + msg_printf(project, MSG_INTERNAL_ERROR, + "App version uses non-existent coprocessor; ignoring" + ); continue; } APP* app = lookup_app(project, avpp.app_name); diff --git a/client/cs_statefile.cpp b/client/cs_statefile.cpp index 4712ac11a2..a9ee74b8f2 100644 --- a/client/cs_statefile.cpp +++ b/client/cs_statefile.cpp @@ -722,6 +722,8 @@ void CLIENT_STATE::check_anonymous() { } } +// parse a project's app_info.xml (anonymous platform) file +// int CLIENT_STATE::parse_app_info(PROJECT* p, FILE* in) { char buf[256]; MIOFILE mf;