* client/app.C: ensure that </stderr_txt> is included in

stderr_out, even if stderr_out is too long.

svn path=/trunk/boinc/; revision=3120
This commit is contained in:
Kevin Dalley 2004-03-22 23:02:45 +00:00
parent 92cae0811f
commit 8f5f0de6a2
1 changed files with 5 additions and 4 deletions

View File

@ -845,8 +845,9 @@ bool ACTIVE_TASK::read_stderr_file() {
stderr_file[n] = '\0';
result->stderr_out += "<stderr_txt>\n";
result->stderr_out += stderr_file;
result->stderr_out += "\n</stderr_txt>\n";
result->stderr_out = result->stderr_out.substr(0,MAX_BLOB_LEN-1);
const char* stderr_txt_close = "\n</stderr_txt>\n";
result->stderr_out = result->stderr_out.substr(0,MAX_BLOB_LEN-1-strlen(stderr_txt_close));
result->stderr_out += stderr_txt_close;
return true;
}
return false;
@ -957,7 +958,7 @@ int ACTIVE_TASK_SET::abort_project(PROJECT* project) {
atp = *task_iter;
if (atp->result->project == project) {
task_iter = active_tasks.erase(task_iter);
delete atp;
delete atp;
} else {
task_iter++;
}
@ -1122,7 +1123,7 @@ int ACTIVE_TASK_SET::restart_tasks() {
"Couldn't restart the app for this result: %d", retval
);
active_tasks.erase(iter);
delete atp;
delete atp;
} else {
iter++;
}