From 9fe771756cdaaccf4fbc4472c5ff0d8ce61caff6 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 6 Jun 2004 06:54:08 +0000 Subject: [PATCH] add logging --- stepmania/src/Profile.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stepmania/src/Profile.cpp b/stepmania/src/Profile.cpp index 2b1d89cae0..f3c4706d3b 100644 --- a/stepmania/src/Profile.cpp +++ b/stepmania/src/Profile.cpp @@ -584,6 +584,8 @@ bool Profile::LoadAllFromDir( CString sDir, bool bRequireSignature ) { CHECKPOINT; + LOG->Trace( "Profile::LoadAllFromDir( %s )", sDir.c_str() ); + InitAll(); LoadEditableDataFromDir( sDir ); @@ -595,8 +597,6 @@ bool Profile::LoadAllFromDir( CString sDir, bool bRequireSignature ) if( !IsAFile(fn) ) break; - LOG->Trace( "Reading profile data '%s'", fn.c_str() ); - // // Don't unreasonably large stats.xml files. // @@ -612,31 +612,37 @@ bool Profile::LoadAllFromDir( CString sDir, bool bRequireSignature ) if( bRequireSignature ) { + CString sStatsXmlSigFile = fn+SIGNATURE_APPEND; CString sDontShareFile = sDir + DONT_SHARE_SIG; + LOG->Trace( "Verifying don't share signature" ); // verify the stats.xml signature with the "don't share" file if( !CryptManager::VerifyFileWithFile(sStatsXmlSigFile, sDontShareFile) ) { LOG->Warn( "The don't share check for '%s' failed. Data will be ignored.", sStatsXmlSigFile.c_str() ); break; } + LOG->Trace( "Done." ); // verify stats.xml + LOG->Trace( "Verifying stats.xml signature" ); if( !CryptManager::VerifyFileWithFile(fn, sStatsXmlSigFile) ) { LOG->Warn( "The signature check for '%s' failed. Data will be ignored.", fn.c_str() ); break; } - + LOG->Trace( "Done." ); } + LOG->Trace( "Loading stats.xml" ); XNode xml; if( !xml.LoadFromFile( fn ) ) { LOG->Warn( "Couldn't open file '%s' for reading.", fn.c_str() ); break; } + LOG->Trace( "Done." ); if( xml.name != "Stats" ) WARN_AND_BREAK;