realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp
branchRCL_3
changeset 56 2c7192069824
parent 46 346e49b9ce14
equal deleted inserted replaced
49:0a1ad22c7bdc 56:2c7192069824
   489 // CSIPIetfProfileContext::ShouldRetryRegistration
   489 // CSIPIetfProfileContext::ShouldRetryRegistration
   490 // -----------------------------------------------------------------------------
   490 // -----------------------------------------------------------------------------
   491 //	
   491 //	
   492 TBool CSIPIetfProfileContext::ShouldRetryRegistration( TInt aError )
   492 TBool CSIPIetfProfileContext::ShouldRetryRegistration( TInt aError )
   493 	{
   493 	{
   494 	return (iProfile && 
   494 	return (aError == K503ServiceUnavailable || 
   495 	        AgentObserver().ProceedRegistration(*iProfile, aError) &&
       
   496 	        (aError == K503ServiceUnavailable || 
       
   497 	        aError == K408TimeOut ||
   495 	        aError == K408TimeOut ||
   498 	        aError == K500ServerInternalError ||
   496 	        aError == K500ServerInternalError ||
   499 		    aError == KErrTimedOut ||
   497 		    aError == KErrTimedOut ||
   500 		    ((aError == KErrSIPResolvingFailure || 
   498 		    ((aError == KErrSIPResolvingFailure || 
   501 		      aError == KErrSIPTransportFailure ||
   499 		      aError == KErrSIPTransportFailure ||
   502 		      aError == KErrSIPICMPFailure ||
   500 		      aError == KErrSIPICMPFailure ||
   503 		      aError == KErrSIPOutboundProxyNotResponding ) && 
   501 		      aError == KErrSIPOutboundProxyNotResponding ) && 
   504 			 iConnection.State() != CSIPConnection::ESuspended)));
   502 			 iConnection.State() != CSIPConnection::ESuspended));
   505 	}
   503 	}
   506 
   504 
   507 // -----------------------------------------------------------------------------
   505 // -----------------------------------------------------------------------------
   508 // CSIPIetfProfileContext::InitializeRetryTimerValue
   506 // CSIPIetfProfileContext::InitializeRetryTimerValue
   509 // -----------------------------------------------------------------------------
   507 // -----------------------------------------------------------------------------
   562         aTransaction==*iClientTx && aRegistration==*iRegistration)
   560         aTransaction==*iClientTx && aRegistration==*iRegistration)
   563         {
   561         {
   564         PROFILE_DEBUG3("SIPIetfProfileContext::IncomingResponse", ProfileId())
   562         PROFILE_DEBUG3("SIPIetfProfileContext::IncomingResponse", ProfileId())
   565         aHandled = ETrue;
   563         aHandled = ETrue;
   566         const CSIPResponseElements* response = aTransaction.ResponseElements();
   564         const CSIPResponseElements* response = aTransaction.ResponseElements();
   567         TInt responseCode  = KErrGeneral;
   565         TUint responseCode = response->StatusCode();
   568         TBool retry = EFalse;
   566         TBool retry = EFalse;
   569         if (response)
   567         if (response)
   570             {
   568             {
   571                 responseCode = response->StatusCode();
       
   572                 
       
   573                 retry = RetryRegister( &aTransaction,  responseCode);
   569                 retry = RetryRegister( &aTransaction,  responseCode);
   574                 if( !retry )
   570                 if( !retry )
   575                 {
   571                 {
   576                     if (responseCode >= K300MultipleChoices)
   572                     if (responseCode >= K300MultipleChoices)
   577                     {
   573                     {