diff -r f54bfd820e04 -r b5e99d8877c7 realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp --- a/realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp Thu Aug 19 10:16:25 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp Tue Aug 31 15:32:57 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 ) {