< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] DialogUsageManager shutdown.


Dear resip devels.
resiprocate 1.9.2

Could you please advise with the next issue?
DilaogUsageManager allows to set ServerAuthManager instance. Then, during application shutdown I call DialogUSageManager::shutdown(DumShutdownHandler*).

I have caught an issue when there are half completed auth transations. I mean that dum fills mIncomingFeatureChainMap with raw pointers( DumFeatureChain* ). After DUM is destroyed - mIncomingFeatureChainMap continues to reference to SharedPtr<DumFeature> list. In my case that was custom AuthManager, inherited from resip::ServerAuthManager. And I've got a crash. Could you please consider next piece of code, which may help to resolve the issue?

diff --git a/resip/dum/DialogUsageManager.cxx b/resip/dum/DialogUsageManager.cxx
index 1312c86..474ac91 100644
--- a/resip/dum/DialogUsageManager.cxx
+++ b/resip/dum/DialogUsageManager.cxx
@@ -186,6 +186,12 @@ DialogUsageManager::~DialogUsageManager()
delete mServerPublications.begin()->second; // Deleting a ServerPublication removes itself from the map
    }

+ for( FeatureChainMap::iterator it = mIncomingFeatureChainMap.begin(), it_end = mIncomingFeatureChainMap.end(); it != it_end; ++it )
+   {
+           delete it->second;
+   }
+
+   mIncomingFeatureChainMap.clear();
    //InfoLog ( << "~DialogUsageManager done" );
 }


Appreciate in advance.
Taras.