diff -r a6fec624de6c -r 706c7a69e448 libraries/iosrv/server/readwrite.cpp --- a/libraries/iosrv/server/readwrite.cpp Thu Nov 04 20:51:05 2010 +0000 +++ b/libraries/iosrv/server/readwrite.cpp Thu Nov 04 23:22:39 2010 +0000 @@ -602,18 +602,31 @@ TInt mode(aMessage.Int0()); if ((mode >= RIoWriteHandle::EText) && (mode <= RIoWriteHandle::EBinary)) { + TInt err = KErrNone; if (ReadEndPoint() && ReadEndPoint()->IorepIsForegroundL(*this)) { __ASSERT_RETURN(!MessagePending(iSetModeMessage), PanicClient(aMessage, EPanicSetModeAlreadyPending)); - ReadEndPoint()->IorepSetConsoleModeL((RIoReadWriteHandle::TMode)mode, *this); iSetModeMessage = aMessage; + TRAP(err, ReadEndPoint()->IorepSetConsoleModeL((RIoReadWriteHandle::TMode)mode, *this)); + if (err && MessagePending(iSetModeMessage)) + { + if (err == KErrNotSupported) + { + // Ignore KErrNotSupported from the console to allow iMode to be set anyway, thereby getting at least the iosrv level behavior. + err = KErrNone; + } + Complete(iSetModeMessage, err); + } } else { Complete(aMessage, KErrNone); } - iMode = static_cast(mode); + if (err == KErrNone) + { + iMode = static_cast(mode); + } } else { @@ -654,7 +667,7 @@ return (iBuf->Length() > 0); } -TBool CIoReadObject::IorIsKeyCaptured(TUint aKeyCode, TUint aModifiers) +TBool CIoReadObject::IorIsKeyCaptured(TUint aKeyCode, TUint aModifiers) const { if (iCaptureAllKeys) { @@ -672,6 +685,11 @@ return EFalse; } +TBool CIoReadObject::IorAllKeysCaptured() const + { + return iCaptureAllKeys; + } + void CIoReadObject::IorReadComplete(TInt aError) { if ((aError == KErrNone) || (aError==KErrEof))