[reSIProcate] possible bug in dum/ServerSubscription.cxx
Hi, all...
The destructor in resip/dum/ServerSubscription.cxx looks like this:
======================================
ServerSubscription::~ServerSubscription()
{
DebugLog(<< "ServerSubscription::~ServerSubscription");
Data key = getEventType() + getDocumentKey();
std::pair<DialogUsageManager::ServerSubscriptions::iterator,DialogUsageManager::ServerSubscriptions::iterator> subs;
subs = mDum.mServerSubscriptions.equal_range(key);
for (DialogUsageManager::ServerSubscriptions::iterator i=subs.first; i!=subs.second; ++i)
{
if (i->second == this)
{
mDum.mServerSubscriptions.erase(i);
break;
}
}
mDum.mServerSubscriptions.erase(key);
mDialog.mServerSubscriptions.remove(this);
}
======================================
It seems to me that the second statement from the bottom which erases the key from mDum.mServerSubscriptions is a bug and shouldn't be there at all. If there are multiple subscriptions to the same event+aor, this line will remove *all* the subs from mServerSubscriptions whenever any one of them is terminated. Am I missing something?
Thanks...
Ron Hough
Estacado Systems