From 8dde49ad0f150224ea8c5409845a7c209d702a95 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 18 May 2005 22:30:37 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=6191 --- checkin_notes | 5 +++++ client/app_graphics.C | 22 +++++++++++++--------- client/ss_logic.C | 10 +++++----- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/checkin_notes b/checkin_notes index 1548d50385..545306292d 100755 --- a/checkin_notes +++ b/checkin_notes @@ -6741,6 +6741,11 @@ Charlie 18 May 2005 Rom 18 May 2005 - Bug Fix: After starting the CC wait for 5 seconds to give the CC time to establish the listening socket for the next rpc request. + - Convert the remaining #ifdef'ed debug messages into scoped messages + so they can be tracked in debug/release builds on all platforms. + client/ + app_graphics.C + ss_logic.C clientgui/ BOINCGUIApp.cpp diff --git a/client/app_graphics.C b/client/app_graphics.C index 51fe0ac09d..034be695de 100644 --- a/client/app_graphics.C +++ b/client/app_graphics.C @@ -66,7 +66,7 @@ void ACTIVE_TASK::request_graphics_mode(GRAPHICS_MSG& m) { void ACTIVE_TASK::check_graphics_mode_ack() { GRAPHICS_MSG gm; char buf[MSG_CHANNEL_SIZE]; - SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_TASK); + SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_SCRSAVE); if (!app_client_shm.shm) return; if (app_client_shm.shm->graphics_reply.get_msg(buf)) { @@ -80,7 +80,7 @@ void ACTIVE_TASK::check_graphics_mode_ack() { is_ss_app) { gstate.ss_logic.stop_ss(); scope_messages.printf( - "ACTIVE_TASK::check_graphics_mode_ack(): shutting down the screensaver" + "ACTIVE_TASK::check_graphics_mode_ack(): shutting down the screensaver\n" ); } if (gm.mode != MODE_REREAD_PREFS) { @@ -110,6 +110,7 @@ ACTIVE_TASK* ACTIVE_TASK_SET::get_ss_app() { void ACTIVE_TASK_SET::save_app_modes() { unsigned int i; ACTIVE_TASK* atp; + SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_SCRSAVE); for (i=0; igraphics_mode_acked = MODE_HIDE_GRAPHICS; } atp->graphics_mode_before_ss = atp->graphics_mode_acked; - //BOINCTRACE("saved mode %d\n", atp->graphics_mode_acked); + scope_messages.printf( + "ACTIVE_TASK_SET::save_app_modes(): saved mode %d\n", atp->graphics_mode_acked + ); } } @@ -178,6 +181,7 @@ ACTIVE_TASK* CLIENT_STATE::get_next_graphics_capable_app() { unsigned int i, j; ACTIVE_TASK *atp, *best_atp; PROJECT *p; + SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_SCRSAVE); // check to see if the applications have changed the graphics ack // since they were first started, this can happen if their is a @@ -211,16 +215,16 @@ ACTIVE_TASK* CLIENT_STATE::get_next_graphics_capable_app() { best_atp = atp; } if (best_atp) { -#ifdef SS_DEBUG - msg_printf(0, MSG_INFO, "get_next_app: %s\n", best_atp->result->name); -#endif + scope_messages.printf( + "CLIENT_STATE::get_next_graphics_capable_app(): get_next_app: %s\n", best_atp->result->name + ); return atp; } } } -#ifdef SS_DEBUG - msg_printf(0, MSG_INFO, "get_next_app: none\n"); -#endif + scope_messages.printf( + "CLIENT_STATE::get_next_graphics_capable_app(): get_next_app: none\n" + ); return NULL; } diff --git a/client/ss_logic.C b/client/ss_logic.C index 645540168f..4238f75483 100644 --- a/client/ss_logic.C +++ b/client/ss_logic.C @@ -128,7 +128,7 @@ void SS_LOGIC::poll(double now) { // if (blank_time && (time(0) > blank_time)) { if (SS_STATUS_BLANKED != ss_status) { - scope_messages.printf("SS_LOGIC::poll(): going to black"); + scope_messages.printf("SS_LOGIC::poll(): going to black\n"); reset(); ss_status = SS_STATUS_BLANKED; } @@ -138,12 +138,12 @@ void SS_LOGIC::poll(double now) { bool stop_app_ss = false; if (atp->graphics_mode_acked == MODE_FULLSCREEN) { if (atp->scheduler_state != CPU_SCHED_SCHEDULED) { - scope_messages.printf("SS_LOGIC::poll(): app %s not scheduled", atp->result->name); + scope_messages.printf("SS_LOGIC::poll(): app %s not scheduled\n", atp->result->name); stop_app_ss = true; } } else { if (time(0) > ack_deadline) { - scope_messages.printf("SS_LOGIC::poll(): app %s not respond", atp->result->name); + scope_messages.printf("SS_LOGIC::poll(): app %s not respond\n", atp->result->name); stop_app_ss = true; } } @@ -162,10 +162,10 @@ void SS_LOGIC::poll(double now) { // atp = gstate.get_next_graphics_capable_app(); if (atp) { - scope_messages.printf("SS_LOGIC::poll(): picked %s, request restart", atp->result->name); + scope_messages.printf("SS_LOGIC::poll(): picked %s, request restart\n", atp->result->name); ask_app(atp, saved_graphics_msg); } else { - scope_messages.printf("SS_LOGIC::poll(): no app found"); + scope_messages.printf("SS_LOGIC::poll(): no app found\n"); if (gstate.active_tasks.active_tasks.size()==0) { if (gstate.projects.size()>0) { ss_status = SS_STATUS_NOAPPSEXECUTING;