MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / purgeDeadDialogs

Method purgeDeadDialogs

SIP/SIP2Interface.cpp:267–285  ·  view source on GitHub ↗

Look at all the dead dialogs and delete any that can be deleted safely. They can be deleted if their SIP timers have expired and no TranEntry still points to them.

Source from the content-addressed store, hash-verified

265// Look at all the dead dialogs and delete any that can be deleted safely.
266// They can be deleted if their SIP timers have expired and no TranEntry still points to them.
267void SipInterface::purgeDeadDialogs()
268{
269#if USE_SCOPED_ITERATORS
270 DeadDialogListType::ScopedIterator sit(mDeadDialogs);
271#else
272 ScopedLock lock(mDeadDialogs.getLock());
273 DeadDialogListType::iterator sit;
274#endif
275 for (sit = mDeadDialogs.begin(); sit != mDeadDialogs.end();) {
276 SipDialog *dialog = *sit;
277 LOG(DEBUG) << "purgeDeadDialogs"<<LOGVAR2("deletable",dialog->dgIsDeletable());
278 if (dialog->dgIsDeletable()) {
279 sit = mDeadDialogs.erase(sit);
280 delete dialog;
281 } else {
282 sit++;
283 }
284 }
285}
286
287SipBase *SipDialogMap::dmFindDialogByRtp(RtpSession *session)
288{

Callers 1

periodicServiceLoopFunction · 0.80

Calls 4

dgIsDeletableMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected