*** empty log message ***

svn path=/trunk/boinc/; revision=6297
This commit is contained in:
Rom Walton 2005-06-07 21:13:37 +00:00
parent 9f1b594cec
commit 767c9e32b7
3 changed files with 15 additions and 0 deletions

View File

@ -7465,3 +7465,10 @@ David 7 June 2005
client/
*.C, *.h
Rom 7 June 2005 (from Walt Gribben)
- Adjust the logging functions so they do not randomly write outside
the scoped area defined for spacing which might cause random crashes
lib/
msg_log.C

View File

@ -58,6 +58,7 @@ show_name("Charlie Fenton");
show_name("John Flynn III");
show_name("Michael Gary");
show_name("Gary Gibson");
show_name("Walt Gribben");
show_name("Jim Harris");
show_name("Volker Hatzenberger");
show_name("Ian Hay");

View File

@ -74,9 +74,16 @@ MSG_LOG::MSG_LOG(FILE* output_) {
void MSG_LOG::enter_level(int diff) {
assert (indent_level >= 0);
if (enter_level <= 0 ) enter_level = 0;
if ((enter_level + diff) <= 0) return;
if (enter_level >= 39 ) enter_level = 39;
if ((enter_level + diff) >= 39) return;
spaces[indent_level] = ' ';
indent_level += diff*2;
spaces[indent_level] = 0;
assert (indent_level >= 0);
}