From 8f5f0de6a2769f3962661c4feee3329630c6bd9c Mon Sep 17 00:00:00 2001 From: Kevin Dalley Date: Mon, 22 Mar 2004 23:02:45 +0000 Subject: [PATCH] * client/app.C: ensure that is included in stderr_out, even if stderr_out is too long. svn path=/trunk/boinc/; revision=3120 --- client/app.C | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/app.C b/client/app.C index d395617db9..98ffa1b95a 100644 --- a/client/app.C +++ b/client/app.C @@ -845,8 +845,9 @@ bool ACTIVE_TASK::read_stderr_file() { stderr_file[n] = '\0'; result->stderr_out += "\n"; result->stderr_out += stderr_file; - result->stderr_out += "\n\n"; - result->stderr_out = result->stderr_out.substr(0,MAX_BLOB_LEN-1); + const char* stderr_txt_close = "\n\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++; }