diff -r 0dcb073356a5 -r 346e49b9ce14 realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp --- a/realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp Wed Sep 01 12:27:36 2010 +0100 +++ b/realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp Tue Sep 14 22:01:18 2010 +0300 @@ -491,7 +491,9 @@ // TBool CSIPIetfProfileContext::ShouldRetryRegistration( TInt aError ) { - return (aError == K503ServiceUnavailable || + return (iProfile && + AgentObserver().ProceedRegistration(*iProfile, aError) && + (aError == K503ServiceUnavailable || aError == K408TimeOut || aError == K500ServerInternalError || aError == KErrTimedOut || @@ -499,7 +501,7 @@ aError == KErrSIPTransportFailure || aError == KErrSIPICMPFailure || aError == KErrSIPOutboundProxyNotResponding ) && - iConnection.State() != CSIPConnection::ESuspended)); + iConnection.State() != CSIPConnection::ESuspended))); } // ----------------------------------------------------------------------------- @@ -562,10 +564,12 @@ PROFILE_DEBUG3("SIPIetfProfileContext::IncomingResponse", ProfileId()) aHandled = ETrue; const CSIPResponseElements* response = aTransaction.ResponseElements(); - TUint responseCode = response->StatusCode(); + TInt responseCode = KErrGeneral; TBool retry = EFalse; if (response) { + responseCode = response->StatusCode(); + retry = RetryRegister( &aTransaction, responseCode); if( !retry ) {