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