realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp
changeset 51 8134400f8f89
parent 45 15965fe54016
equal deleted inserted replaced
48:e3fccba1f02f 51:8134400f8f89
   763 //
   763 //
   764 TBool CSIPProfileCacheItem::HandleError(TInt aError)
   764 TBool CSIPProfileCacheItem::HandleError(TInt aError)
   765 	{
   765 	{
   766 	PROFILE_DEBUG4("ProfileCacheItem::HandleError id,err", ProfileId(), aError)
   766 	PROFILE_DEBUG4("ProfileCacheItem::HandleError id,err", ProfileId(), aError)
   767 
   767 
       
   768     TBool updateProfile(HasProfileUpdate() && iCurrentState->Name() == 
       
   769             CSIPConcreteProfile::EUnregistrationInProgress);
   768 	if (iCurrentState->ErrorOccurred(*this, aError))
   770 	if (iCurrentState->ErrorOccurred(*this, aError))
   769 		{
   771 		{
   770 		PROFILE_DEBUG1("ProfileCacheItem::HandleError go unregistered")
   772 		PROFILE_DEBUG1("ProfileCacheItem::HandleError go unregistered")
   771 		        
   773 		    
       
   774         if(updateProfile)
       
   775             {
       
   776             PROFILE_DEBUG1("CSIPProfileCacheItem::HandleError ChangeStateL")
       
   777             StopSnapMonitoring();
       
   778             TRAPD(err, ChangeStateL(&iServerCore.UnregisteredState()));
       
   779             if (err == KErrNone)
       
   780                 {                 
       
   781                 return EFalse;
       
   782                 }
       
   783             }
       
   784         PROFILE_DEBUG1("CSIPProfileCacheItem::HandleError SwitchToUnregisteredState")
   772         if(SwitchToUnregisteredState(ETrue))
   785         if(SwitchToUnregisteredState(ETrue))
   773             {
   786             {
   774             return EFalse;
   787             return EFalse;
   775             }		
   788             }		
   776 		
   789