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

Re: [reSIProcate] DUM Dialog.cxx Erro Code


Go look at the implementations of ~ClientSubscription() and ~ServerSubscription(). They remove themselves from the data structures.

Best regards,
Byron Campen

 Hello:

Dialog::~Dialog()
{
   DebugLog ( <<"Dialog::~Dialog() ");

   mDestroying = true;

   while (!mClientSubscriptions.empty())
   {
      delete *mClientSubscriptions.begin();
   }
   while (!mServerSubscriptions.empty())
   {
      delete *mServerSubscriptions.begin();
   }

   delete mInviteSession;
   mDialogSet.mDialogs.erase(this->getId());
   delete mAppDialog;
   if(!mReUseDialogSet)
   {
      mDialogSet.possiblyDie();
   }
}

in this function;

   while (!mClientSubscriptions.empty())
   {
      delete *mClientSubscriptions.begin();
   }
   while (!mServerSubscriptions.empty())
   {
      delete *mServerSubscriptions.begin();
   }

must change to :
   while (!mClientSubscriptions.empty())
   {
      delete *mClientSubscriptions.begin();
          mClientSubscriptions.pop_front();
   }
   while (!mServerSubscriptions.empty())
   {
      delete *mServerSubscriptions.begin();
      mServerSubscriptions.pop_front();
   }

otherwise it should be a dead loop!
                                
--------------
fancy_xiao
2007-02-06

_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel

Attachment: smime.p7s
Description: S/MIME cryptographic signature