diff -r 12f9acf7a934 -r bdf78597b41c videoutils_plat/videoconnutility_api/tsrc/VCXTestCommon/src/VCXTestMessageWait.cpp --- a/videoutils_plat/videoconnutility_api/tsrc/VCXTestCommon/src/VCXTestMessageWait.cpp Mon Jan 18 21:13:36 2010 +0200 +++ b/videoutils_plat/videoconnutility_api/tsrc/VCXTestCommon/src/VCXTestMessageWait.cpp Tue Jan 26 12:55:56 2010 +0200 @@ -205,6 +205,8 @@ } else { + iWaitStarted = EFalse; + // Nothing to wait for. iTimeoutTimer->CancelTimer(); @@ -245,10 +247,17 @@ // EXPORT_C void CVCXTestMessageWait::ReceiveMessage( TInt32 aMsg, TInt aError ) { + if( !iWaitStarted ) + { + VCXLOGLO1("CVCXTestMessageWait::ReceiveMessage: Wait not active."); + return; + } + VCXLOGLO1(">>>CVCXTestMessageWait::ReceiveMessage"); if( aError != KErrNone ) { + iWaitStarted = EFalse; if( iActiveWaitBlocking->IsWaiting() ) { iError = aError; @@ -291,6 +300,7 @@ if( iWaitedMessages.Count() <= 0 ) { + iWaitStarted = EFalse; // Stop wait. if( iActiveWaitBlocking->IsWaiting() ) { @@ -327,6 +337,7 @@ else if( iWaitedMessages.Count() > 0 ) { + iWaitStarted = EFalse; VCXLOGLO2("CVCXTestMessageWait:: Timeout. Messages left: %d", iWaitedMessages.Count()); if( iActiveWaitBlocking->IsWaiting() ) {