Commit 2574afb4 authored by David Anderson's avatar David Anderson

- client: more instances of showing project with message. Fixes #848


svn path=/trunk/boinc/; revision=17335
parent 26f4f33b
......@@ -1886,3 +1886,16 @@ David 22 Feb 2009
cs_files.cpp
file_xfer.cpp
pers_file_xfer.cpp
David 22 Feb 2009
- client: more instances of showing project with message. Fixes #848
client/
app_start.cpp
app_graphics.cpp
file_xfer.cpp
cs_account.cpp
cs_scheduler.cpp
scheduler_op.cpp
app.cpp
app_control.cpp
......@@ -239,13 +239,13 @@ void ACTIVE_TASK::cleanup_task() {
{
retval = detach_shmem(app_client_shm.shm);
if (retval) {
msg_printf(NULL, MSG_INTERNAL_ERROR,
msg_printf(wup->project, MSG_INTERNAL_ERROR,
"Couldn't detach shared memory: %s", boincerror(retval)
);
}
retval = destroy_shmem(shmem_seg_name);
if (retval) {
msg_printf(NULL, MSG_INTERNAL_ERROR,
msg_printf(wup->project, MSG_INTERNAL_ERROR,
"Couldn't destroy shared memory: %s", boincerror(retval)
);
}
......@@ -313,7 +313,7 @@ void ACTIVE_TASK_SET::get_memory_usage() {
retval = procinfo_setup(piv);
if (retval) {
if (log_flags.mem_usage_debug) {
msg_printf(0, MSG_INTERNAL_ERROR,
msg_printf(NULL, MSG_INTERNAL_ERROR,
"[mem_usage_debug] procinfo_setup() returned %d", retval
);
}
......@@ -689,7 +689,7 @@ int ACTIVE_TASK::parse(MIOFILE& fin) {
else if (parse_double(buf, "<current_cpu_time>", x)) continue;
else {
if (log_flags.unparsed_xml) {
msg_printf(0, MSG_INFO,
msg_printf(project, MSG_INFO,
"[unparsed_xml] ACTIVE_TASK::parse(): unrecognized %s\n", buf
);
}
......@@ -753,7 +753,7 @@ int ACTIVE_TASK_SET::parse(MIOFILE& fin) {
else delete atp;
} else {
if (log_flags.unparsed_xml) {
msg_printf(0, MSG_INFO,
msg_printf(NULL, MSG_INFO,
"[unparsed_xml] ACTIVE_TASK_SET::parse(): unrecognized %s\n", buf
);
}
......@@ -881,7 +881,9 @@ int ACTIVE_TASK::handle_upload_files() {
fip->status = FILE_PRESENT;
}
} else {
msg_printf(0, MSG_INTERNAL_ERROR, "Can't find uploadable file %s", p);
msg_printf(wup->project, MSG_INTERNAL_ERROR,
"Can't find uploadable file %s", p
);
}
sprintf(path, "%s/%s", slot_dir, buf);
delete_project_owned_file(path, true); // delete the link file
......
......@@ -448,7 +448,7 @@ void ACTIVE_TASK_SET::process_control_poll() {
//
if (atp->process_control_queue.timeout(180)) {
if (log_flags.task_debug) {
msg_printf(NULL, MSG_INFO,
msg_printf(atp->result->project, MSG_INFO,
"Restarting %s - message timeout", atp->result->name
);
}
......@@ -482,7 +482,7 @@ bool ACTIVE_TASK_SET::check_app_exited() {
} else {
if (log_flags.task_debug) {
char errmsg[1024];
msg_printf(0, MSG_INFO,
msg_printf(atp->result->project, MSG_INFO,
"[task_debug] task %s GetExitCodeProcess() failed - %s GLE %d (0x%x)",
atp->result->name,
windows_format_error_string(
......@@ -508,7 +508,9 @@ bool ACTIVE_TASK_SET::check_app_exited() {
// is probably a benchmark process; don't show error
//
if (!gstate.are_cpu_benchmarks_running() && log_flags.task_debug) {
msg_printf(NULL, MSG_INTERNAL_ERROR, "Process %d not found\n", pid);
msg_printf(atp->result->project, MSG_INTERNAL_ERROR,
"Process %d not found\n", pid
);
}
return false;
}
......@@ -528,7 +530,7 @@ bool ACTIVE_TASK::check_max_disk_exceeded() {
retval = current_disk_usage(disk_usage);
if (retval) {
msg_printf(0, MSG_INTERNAL_ERROR,
msg_printf(this->wup->project, MSG_INTERNAL_ERROR,
"Can't get task disk usage: %s", boincerror(retval)
);
} else {
......@@ -925,7 +927,7 @@ bool ACTIVE_TASK::get_app_status_msg() {
return false;
}
if (log_flags.app_msg_receive) {
msg_printf(NULL, MSG_INFO,
msg_printf(this->wup->project, MSG_INFO,
"[app_msg_receive] got msg from slot %d: %s", slot, msg_buf
);
}
......
......@@ -73,7 +73,7 @@ void ACTIVE_TASK::request_graphics_mode(GRAPHICS_MSG& m) {
}
if (log_flags.scrsave_debug) {
msg_printf(0, MSG_INFO,
msg_printf(wup->project, MSG_INFO,
"[scrsave_debug] ACTIVE_TASK::request_graphics_mode(): requesting graphics mode %s for %s",
xml_graphics_modes[m.mode], result->name
);
......@@ -102,7 +102,7 @@ void ACTIVE_TASK::check_graphics_mode_ack() {
if (app_client_shm.shm->graphics_reply.get_msg(buf)) {
app_client_shm.decode_graphics_msg(buf, gm);
if (log_flags.scrsave_debug) {
msg_printf(0, MSG_INFO,
msg_printf(wup->project, MSG_INFO,
"[scrsave_debug] ACTIVE_TASK::check_graphics_mode_ack(): got graphics ack %s for %s, previous mode %s",
buf, result->name, xml_graphics_modes[graphics_mode_acked]
);
......
......@@ -372,12 +372,12 @@ int ACTIVE_TASK::start(bool first_time) {
bool high_priority = (app_version->avg_ncpus < 1);
if (first_time && log_flags.task) {
msg_printf(result->project, MSG_INFO,
msg_printf(wup->project, MSG_INFO,
"Starting %s", result->name
);
}
if (log_flags.cpu_sched) {
msg_printf(result->project, MSG_INFO,
msg_printf(wup->project, MSG_INFO,
"[cpu_sched] Starting %s%s", result->name, first_time?" (initial)":"(resume)"
);
}
......@@ -548,7 +548,7 @@ int ACTIVE_TASK::start(bool first_time) {
if (!pCEB(&environment_block, sandbox_account_service_token, FALSE)) {
if (log_flags.task) {
windows_error_string(error_msg, sizeof(error_msg));
msg_printf(result->project, MSG_INFO,
msg_printf(wup->project, MSG_INFO,
"Process environment block creation failed: %s", error_msg
);
}
......@@ -579,7 +579,7 @@ int ACTIVE_TASK::start(bool first_time) {
if (!pDEB(environment_block)) {
if (log_flags.task) {
windows_error_string(error_msg, sizeof(error_msg2));
msg_printf(result->project, MSG_INFO,
msg_printf(wup->project, MSG_INFO,
"Process environment block cleanup failed: %s",
error_msg2
);
......@@ -681,7 +681,7 @@ int ACTIVE_TASK::start(bool first_time) {
chdir(current_dir);
if (log_flags.task_debug) {
msg_printf(0, MSG_INFO,
msg_printf(wup->project, MSG_INFO,
"[task_debug] ACTIVE_TASK::start(): forked process: pid %d\n", pid
);
}
......@@ -848,7 +848,7 @@ int ACTIVE_TASK::start(bool first_time) {
}
if (log_flags.task_debug) {
msg_printf(0, MSG_INFO,
msg_printf(wup->project, MSG_INFO,
"[task_debug] ACTIVE_TASK::start(): forked process: pid %d\n", pid
);
}
......
......@@ -247,13 +247,13 @@ int CLIENT_STATE::parse_account_files() {
retval = project->parse_account(f);
fclose(f);
if (retval) {
msg_printf(NULL, MSG_INTERNAL_ERROR,
msg_printf(project, MSG_INTERNAL_ERROR,
"Couldn't parse account file %s", name.c_str()
);
delete project;
} else {
if (lookup_project(project->master_url)) {
msg_printf(NULL, MSG_INFO,
msg_printf(project, MSG_INFO,
"Duplicate account file %s - ignoring", name.c_str()
);
delete project;
......
......@@ -802,7 +802,7 @@ int CLIENT_STATE::handle_scheduler_reply(PROJECT* project, char* scheduler_url)
//
for (i=0; i<sr.result_acks.size(); i++) {
if (log_flags.sched_op_debug) {
msg_printf(0, MSG_INFO,
msg_printf(project, MSG_INFO,
"[sched_op_debug] handle_scheduler_reply(): got ack for result %s\n",
sr.result_acks[i].name
);
......@@ -896,7 +896,7 @@ int CLIENT_STATE::handle_scheduler_reply(PROJECT* project, char* scheduler_url)
set_client_state_dirty("handle_scheduler_reply");
if (log_flags.state_debug) {
msg_printf(0, MSG_INFO,
msg_printf(project, MSG_INFO,
"[state_debug] handle_scheduler_reply(): State after handle_scheduler_reply():"
);
print_summary();
......
......@@ -203,7 +203,7 @@ int FILE_XFER_SET::remove(FILE_XFER* fxp) {
}
iter++;
}
msg_printf(NULL, MSG_INTERNAL_ERROR,
msg_printf(fxp->fip->project, MSG_INTERNAL_ERROR,
"File transfer for %s not found", fxp->fip->name
);
return ERR_NOT_FOUND;
......
......@@ -814,7 +814,7 @@ int SCHEDULER_REPLY::parse(FILE* in, PROJECT* project) {
continue;
} else if (strlen(buf)>1){
if (log_flags.unparsed_xml) {
msg_printf(0, MSG_INFO,
msg_printf(project, MSG_INFO,
"[unparsed_xml] SCHEDULER_REPLY::parse(): unrecognized %s\n", buf
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment