diff -r d3d7683d16f5 -r 5cdddd04119b wlan_bearer/wlanagent/src/wlanagtstates.cpp --- a/wlan_bearer/wlanagent/src/wlanagtstates.cpp Wed Sep 01 12:41:05 2010 +0100 +++ b/wlan_bearer/wlanagent/src/wlanagtstates.cpp Wed Oct 13 16:35:50 2010 +0300 @@ -16,7 +16,7 @@ */ /* -* %version: 35 % +* %version: 36 % */ #include @@ -577,7 +577,8 @@ // ----------------------------------------------------------------------------- // CWlanDisconnectState::CWlanDisconnectState(CWlanSM* aWlanSM, RWLMServer& aWLMServer) : - CWlanStateBase(aWlanSM, aWLMServer) + CWlanStateBase(aWlanSM, aWLMServer), + iAgtHotSpotClient( NULL ) { DEBUG( "CWlanDisconnectState constructor" ); } @@ -604,29 +605,23 @@ { DEBUG( "CWlanDisconnectState::StartState()" ); // check if plug-in is available - TRAPD( ret, iAgtHotSpotClient = CWlanAgtHotSpotClient::NewL() ); - - if( ret == KErrNone ) - { - DEBUG( "CWlanDisconnectState::StartState(), AgtHotSpot plugin is available" ); + if ( iWlanSM->IsHotSpotAP() ) + { + TRAPD( ret, iAgtHotSpotClient = CWlanAgtHotSpotClient::NewL() ); + if( ret == KErrNone ) + { + DEBUG( "CWlanDisconnectState::StartState(), AgtHotSpot plugin is available" ); - if ( iWlanSM->IsHotSpotAP() ) - { - // talk to hospot server - DEBUG( "CWlanDisconnectState::StartState(), Sending CloseConnection message to HotSpot Server" ); - iAgtHotSpotClient->HotSpotCloseConnection( iWlanSM->IapId(), iStatus ); - SetActive(); - return; + // talk to hospot server + DEBUG( "CWlanDisconnectState::StartState(), Sending CloseConnection message to HotSpot Server" ); + iAgtHotSpotClient->HotSpotCloseConnection( iWlanSM->IapId(), iStatus ); + SetActive(); + return; + } } - } - else - { - iAgtHotSpotClient = NULL; - } JumpToRunl( KErrNone ); } - // ----------------------------------------------------------------------------- // CWlanDisconnectState::NextStateL // -----------------------------------------------------------------------------