*** empty log message ***

svn path=/trunk/boinc/; revision=4331
This commit is contained in:
David Anderson 2004-10-15 19:19:03 +00:00
parent bfb42fbaf8
commit d40654c9ce
5 changed files with 39 additions and 17 deletions

View File

@ -76,6 +76,8 @@ extern "C" {
extern int boinc_wu_cpu_time(double&);
extern int boinc_calling_thread_cpu_time(double&, double&);
extern int boinc_suspend_other_activities();
extern int boinc_resume_other_activities();
} // extern "C"
extern APP_INIT_DATA aid;
@ -86,10 +88,12 @@ extern APP_INIT_DATA aid;
extern APP_CLIENT_SHM *app_client_shm;
#if 0
#ifdef HAVE_SIGNAL_H
extern void boinc_catch_signal(int signal);
extern void boinc_quit(int sig);
#endif
#endif
/////////// IMPLEMENTATION STUFF ENDS HERE

View File

@ -18428,3 +18428,12 @@ Lana 14 Oct 2004
sched/
db_purge.C
David 15 Oct 2004
- GUI RPC: don't crash if bad project URL
- SCHEDULER_REPLY::parse(): tolerate extra lines
at start of scheduler reply (from Volker Hatzenberger)
client/
gui_rpc_server.C
scheduler_op.C

View File

@ -156,6 +156,7 @@ static void handle_project_op(char* buf, MIOFILE& fout, char* op) {
PROJECT* p = get_project(buf, fout);
if (!p) {
fout.printf("<error>no such project</error>\n");
return;
}
if (!strcmp(op, "reset")) {
gstate.reset_project(p);
@ -317,7 +318,10 @@ static void handle_file_transfer_op(char* buf, MIOFILE& fout, char* op) {
string filename;
PROJECT* p = get_project(buf, fout);
if (!p) return;
if (!p) {
fout.printf("<error>No such project</error>\n");
return;
}
if (!parse_str(buf, "<filename>", filename)) {
fout.printf("<error>Missing filename</error>\n");
@ -352,7 +356,10 @@ static void handle_result_op(char* buf, MIOFILE& fout, char* op) {
ACTIVE_TASK* atp;
PROJECT* p = get_project(buf, fout);
if (!p) return;
if (!p) {
fout.printf("<error>No such project</error>\n");
return;
}
if (!parse_str(buf, "<name>", result_name, sizeof(result_name))) {
fout.printf("<error>Missing result name</error>\n");

View File

@ -568,11 +568,12 @@ SCHEDULER_REPLY::~SCHEDULER_REPLY() {
// Others are copied straight to the PROJECT
//
int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) {
char buf[256], *p;
char buf[256];
int retval, x;
MIOFILE mf;
char delete_file_name[256];
mf.init_file(in);
bool found_start_tag = false;
SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_SCHED_OP);
@ -589,21 +590,17 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) {
project_is_down = false;
send_file_list = false;
p = fgets(buf, 256, in);
if (!p) {
msg_printf(project, MSG_ERROR, "SCHEDULER_REPLY::parse(): empty file\n");
return ERR_XML_PARSE;
}
// First part of content should either be tag (HTTP 1.0) or
// First line should either be tag (HTTP 1.0) or
// hex length of response (HTTP 1.1)
if (!match_tag(buf, "<scheduler_reply>")) {
msg_printf(project, MSG_ERROR, "SCHEDULER_REPLY::parse(): bad first tag %s\n", buf);
return ERR_XML_PARSE;
}
//
while (fgets(buf, 256, in)) {
if (match_tag(buf, "<scheduler_reply>")) {
// Do nothing
} else if (match_tag(buf, "</scheduler_reply>")) return 0;
if (!found_start_tag) {
if (match_tag(buf, "<scheduler_reply")) {
found_start_tag = true;
}
continue;
}
if (match_tag(buf, "</scheduler_reply>")) return 0;
else if (parse_str(buf, "<project_name>", project->project_name, sizeof(project->project_name))) continue;
else if (parse_str(buf, "<user_name>", project->user_name, sizeof(project->user_name))) continue;
else if (parse_double(buf, "<user_total_credit>", project->user_total_credit)) continue;
@ -744,6 +741,10 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) {
scope_messages.printf("SCHEDULER_REPLY::parse(): unrecognized %s\n", buf);
}
}
msg_printf(project, MSG_ERROR, "SCHEDULER_REPLY::parse(): no close tag\n");
if (found_start_tag) {
msg_printf(project, MSG_ERROR, "No close tag in scheduler reply\n");
} else {
msg_printf(project, MSG_ERROR, "No start tag in scheduler reply\n");
}
return ERR_XML_PARSE;
}

View File

@ -31,6 +31,7 @@ show_name("Markku Degerholm");
show_name("James Drews");
show_name("Michael Gary");
show_name("Gary Gibson");
show_name("Volker Hatzenberger");
show_name("Ian Hay");
show_name("Eric Heien");
show_name("Thomas Horsten");