diff -r 2553637c2525 -r 27dcfaab8b5b localconnectivityservice/dun/atext/src/DunAtCmdPusher.cpp --- a/localconnectivityservice/dun/atext/src/DunAtCmdPusher.cpp Tue May 25 13:38:30 2010 +0300 +++ b/localconnectivityservice/dun/atext/src/DunAtCmdPusher.cpp Wed Jun 09 10:39:48 2010 +0300 @@ -274,9 +274,15 @@ FTRACE(FPrint( _L("CDunAtCmdPusher::CheckAndRemoveOkString()") )); TInt recvBufferLength = iRecvBuffer.Length(); TInt okBufferLength = iOkBuffer->Length(); - if ( recvBufferLength <= okBufferLength ) + // Skip the removal if removing not possible, if removal results in zero + // length (plugin should have used KErrReplyTypeOk) or if string to be + // removed is zero. + // Note also that if plugin sends a final reply when quiet mode is on, DUN + // can't remove the possibly existing result code as it is different from + // iOkReply (zero length). + if ( recvBufferLength<=okBufferLength || okBufferLength<=0 ) { - FTRACE(FPrint( _L("CDunAtCmdPusher::CheckAndRemoveOkString() (ERROR) complete") )); + FTRACE(FPrint( _L("CDunAtCmdPusher::CheckAndRemoveOkString() (skip) complete") )); return KErrGeneral; } TInt lengthWithNoOk = recvBufferLength - okBufferLength;