diff -r 1f58177f6740 -r 9894ed580e4a mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/ThreadPriority.cpp --- a/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/ThreadPriority.cpp Thu Aug 12 20:27:32 2010 -0500 +++ b/mmfenh/advancedaudiocontroller/tsrc/advancedaudiocontrollertestmodule/AudioRecorderTestModule/src/ThreadPriority.cpp Tue Aug 24 03:16:41 2010 -0500 @@ -106,8 +106,10 @@ CleanupStack::PushL(selfObj); CActiveScheduler::Start(); - - + + if(selfObj->iCallbackErr != KErrNone) + error = selfObj->iCallbackErr; + CleanupStack::PopAndDestroy(2); // schedule, selfObj return error; @@ -136,10 +138,12 @@ #ifdef _DEBUG RDebug::Print (_L ("CThreadPriority::MoscoStateChangeEvent")); #endif - TInt err = KErrNone; + logger->Log(_L("MoscoStateChangeEvent called, error: %d prev: %d curr : %d"),aErrorCode,aPreviousState,aCurrentState); logger->Log(_L("Before Checking Duaration.")); +iCallbackErr = aErrorCode; + TTimeIntervalMicroSeconds aDuration, aRecordTime; TMMFDurationInfo clipDuration = recorder->Duration(aDuration); logger->Log(_L("Duaration is %d"), aDuration.Int64()); @@ -191,10 +195,17 @@ CActiveScheduler::Stop(); + return; } + if (aErrorCode != KErrNone) + { + + CActiveScheduler::Stop(); + return ; + } - return; + }