diff -r dc67b94625c5 -r 9d35fd98f273 hwrmhaptics/hapticsclient/src/hwrmhapticssession.cpp --- a/hwrmhaptics/hapticsclient/src/hwrmhapticssession.cpp Fri Sep 17 08:36:42 2010 +0300 +++ b/hwrmhaptics/hapticsclient/src/hwrmhapticssession.cpp Mon Oct 04 02:28:24 2010 +0300 @@ -155,11 +155,17 @@ } User::WaitForRequest( status ); + + // We can't use the 'exit reason' if the server paniced as this + // is the panic 'reason' and may be '0' which cannot be distinguished + // from KErrNone + ret = (server.ExitType() == EExitPanic)? KErrGeneral : status.Int(); + server.Close(); - COMPONENT_TRACE( ( _L( "RHWRMHapticsSession::StartServer - return %d" ), status.Int() ) ); + COMPONENT_TRACE( ( _L( "RHWRMHapticsSession::StartServer - return %d" ), ret ) ); - return status.Int(); + return ret; } // ---------------------------------------------------------------------------