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

RE: [reSIProcate] Correct way to shutdown dum


Hi Scott,

unfortunately I can't wait 32s...

> Also I shutdown dum and wait for it to complete before 
> shutting down the stack - although I'm not sure that it matters.  

How do you wait for completion, through the shutdown method
and waiting until onDumCanBeDeleted() has been called?

Would I have to expect memory leaks if I call shutdown,
wait 5s and then proceed with the code I posted?

Thanks, 

Matthias


> > -----Original Message-----
> > From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:resiprocate-
> > devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Matthias Moetje -
> TERASENS
> > GmbH
> > Sent: Tuesday, April 04, 2006 10:04 AM
> > To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > Subject: [reSIProcate] Correct way to shutdown dum
> > 
> > Hi,
> > 
> > when I shutdown dum I would like to shutdown as gracefully as 
> > possible. Also I want to remove all registrations and have 
> all active 
> > sessions closed. I am looking for the best method to 
> acomplish that. 
> > In addition I don't have much time for it (max. 5s) because my 
> > application must be shut down through a synchronous 
> function (called 
> > from another application).
> > The shutdown method of dum has a "giveUpSeconds" parameter but this 
> > paramter is just ignored/unused. So how should I shutdown 
> everything?
> > 
> > Currently I'm doing this:
> > 
> > 
> >             if (mStackThread)
> >             {
> >                     mStackThread->shutdown();
> >             }
> >             if (mDumThread)
> >             {
> >                     mDumThread->shutdown();
> >             }
> >             if (mStackThread)
> >             {
> >                     mStackThread->join();
> >                     delete mStackThread;
> >                     mStackThread = NULL;
> >             }
> >             if (mDumThread)
> >             {
> >                     mDumThread->join();
> >                     delete mDumThread;
> >                     mDumThread = NULL;
> >             }
> >             if (mDum)
> >             {
> >                     delete mDum;
> >                     mDum = NULL;
> >             }
> > 
> >             if (mStack)
> >             {
> >                     delete mStack;
> >                     mStack = NULL;
> >             }
> > 
> > But obviously this doesn't wait until all sessions are ended or 
> > registrations have been removed..
> > 
> > 
> > Best regards,
> > 
> > Matthias Moetje
> > 
> > _______________________________________________
> > resiprocate-devel mailing list
> > resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>