[reSIProcate] possible bug in dum/ServerSubscription.cxx

Ron Hough hough.ron at gmail.com
Mon Feb 13 14:52:40 CST 2006


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20060213/ed071e84/attachment.htm>


More information about the resiprocate-devel mailing list