diff -r a003f0e60a07 -r e4420734a2a0 realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp --- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp Fri Sep 03 14:18:25 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp Tue Oct 19 05:33:24 2010 +0530 @@ -765,10 +765,23 @@ { PROFILE_DEBUG4("ProfileCacheItem::HandleError id,err", ProfileId(), aError) + TBool updateProfile(HasProfileUpdate() && iCurrentState->Name() == + CSIPConcreteProfile::EUnregistrationInProgress); if (iCurrentState->ErrorOccurred(*this, aError)) { PROFILE_DEBUG1("ProfileCacheItem::HandleError go unregistered") - + + if(updateProfile) + { + PROFILE_DEBUG1("CSIPProfileCacheItem::HandleError ChangeStateL") + StopSnapMonitoring(); + TRAPD(err, ChangeStateL(&iServerCore.UnregisteredState())); + if (err == KErrNone) + { + return EFalse; + } + } + PROFILE_DEBUG1("CSIPProfileCacheItem::HandleError SwitchToUnregisteredState") if(SwitchToUnregisteredState(ETrue)) { return EFalse;