linklayercontrol/networkinterfacemgr/agentprcore/src/CAgentAdapter.cpp
changeset 68 1697cc2ba93d
parent 18 39bb7c3571e9
equal deleted inserted replaced
62:2f37ef12b43e 68:1697cc2ba93d
    69 */
    69 */
    70 CAgentAdapter::CAgentAdapter(CAgentSubConnectionProvider& aAgentScpr)
    70 CAgentAdapter::CAgentAdapter(CAgentSubConnectionProvider& aAgentScpr)
    71     : iAgentScpr(aAgentScpr),
    71     : iAgentScpr(aAgentScpr),
    72     iAgentState(EDisconnected),
    72     iAgentState(EDisconnected),
    73     iAgentConnectType(EAgentNone),
    73     iAgentConnectType(EAgentNone),
    74     iLastProgress(KFinishedSelection,KErrNone)
    74     iLastProgress(KFinishedSelection,KErrNone),iAgentErrorState(EFalse)
    75     {
    75     {
    76     }
    76     }
    77 
    77 
    78 
    78 
    79 /**
    79 /**
   153         }
   153         }
   154     else if (iAgentState == EReconnecting)
   154     else if (iAgentState == EReconnecting)
   155         {
   155         {
   156         iAgent->CancelReconnect();
   156         iAgent->CancelReconnect();
   157         }
   157         }
   158     iAgentState = EDisconnecting;
   158     if (iAgentState != EDisconnecting)
   159     iAgent->Disconnect(aReason);
   159         {        
       
   160         iAgentState = EDisconnecting;
       
   161     	iAgent->Disconnect(aReason);
       
   162         }
   160     }
   163     }
   161 
   164 
   162 
   165 
   163 /**
   166 /**
   164 Starts the process of obtaining authentication information via the Agent
   167 Starts the process of obtaining authentication information via the Agent
   305 #endif
   308 #endif
   306             }
   309             }
   307         else
   310         else
   308             {
   311             {
   309             iLastProgress.iError = aStatus;
   312             iLastProgress.iError = aStatus;
       
   313             // set the agent state to EDisconnecting
       
   314             iAgentState = EDisconnecting;
   310             iAgent->Disconnect(aStatus);
   315             iAgent->Disconnect(aStatus);
   311             }
   316             }
   312         }
   317         }
   313    }
   318    }
   314 
   319 
   389 #endif
   394 #endif
   390         }
   395         }
   391     else
   396     else
   392         {
   397         {
   393         iAgentScpr.Error(iLastProgress);
   398         iAgentScpr.Error(iLastProgress);
       
   399         iAgentErrorState = ETrue;
   394         }
   400         }
   395     }
   401     }
   396 
   402 
   397 
   403 
   398 /**
   404 /**