diff -r 866b4af7ffbe -r 841f70763fbe localconnectivityservice/dun/atext/src/DunAtModeListen.cpp --- a/localconnectivityservice/dun/atext/src/DunAtModeListen.cpp Tue Sep 28 20:14:08 2010 +0800 +++ b/localconnectivityservice/dun/atext/src/DunAtModeListen.cpp Thu Nov 04 15:31:42 2010 +0800 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -78,13 +78,11 @@ TInt CDunAtModeListen::IssueRequest() { FTRACE(FPrint( _L("CDunAtModeListen::IssueRequest()" ))); - if ( iModeListenState != EDunStateIdle ) + if ( IsActive() ) { FTRACE(FPrint( _L("CDunAtModeListen::IssueRequest() (not ready) complete" ) )); return KErrNotReady; } - iStatus = KRequestPending; - iModeListenState = EDunStateModeListening; iAtCmdExtCommon->ReceiveModeStatusChange( iStatus, iModePckg ); SetActive(); FTRACE(FPrint( _L("CDunAtModeListen::IssueRequest() complete" ))); @@ -95,19 +93,11 @@ // Stops monitoring for mode status changes // --------------------------------------------------------------------------- // -TInt CDunAtModeListen::Stop() +void CDunAtModeListen::Stop() { FTRACE(FPrint( _L("CDunAtModeListen::Stop()" ))); - if ( iModeListenState != EDunStateModeListening ) - { - FTRACE(FPrint( _L("CDunAtModeListen::Stop() (not ready) complete" ) )); - return KErrNotReady; - } - iAtCmdExtCommon->CancelReceiveModeStatusChange(); Cancel(); - iModeListenState = EDunStateIdle; FTRACE(FPrint( _L("CDunAtModeListen::Stop() complete" ))); - return KErrNone; } // --------------------------------------------------------------------------- @@ -147,7 +137,6 @@ { // Don't initialize iAtCmdExtCommon here (it is set through NewL) // Don't initialize iCallback here (it is set through NewL) - iModeListenState = EDunStateIdle; iMode = 0; } @@ -159,7 +148,6 @@ void CDunAtModeListen::RunL() { FTRACE(FPrint( _L("CDunAtModeListen::RunL()") )); - iModeListenState = EDunStateIdle; TInt retTemp = iStatus.Int(); if ( retTemp != KErrNone ) { @@ -180,5 +168,6 @@ void CDunAtModeListen::DoCancel() { FTRACE(FPrint( _L("CDunAtModeListen::DoCancel()") )); + iAtCmdExtCommon->CancelReceiveModeStatusChange(); FTRACE(FPrint( _L("CDunAtModeListen::DoCancel() complete") )); }