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

Method dmRemoveDialog

SIP/SIP2Interface.cpp:137–150  ·  view source on GitHub ↗

This removes the SipDialog from the map so it will no longer receive SIP messages. It moves it to the mDeadDialogs queue, whence it will be deleted when we are sure there is no transaction still pointing to it.

Source from the content-addressed store, hash-verified

135// It moves it to the mDeadDialogs queue, whence it will be deleted when we
136// are sure there is no transaction still pointing to it.
137bool SipDialogMap::dmRemoveDialog(SipBase *dialog)
138{
139 string callid = dialog->callId(), localtag = dialog->dsLocalTag();
140 SipDialog *dialog1 = mDialogMap.getNoBlock(makeTagKey(callid,localtag)); // Removes the element.
141 if (dialog1) {
142 gSipInterface.mDeadDialogs.push_back(dialog1);
143 }
144 SipDialog *dialog2 = mDialogMap.getNoBlock(makeTagKey(callid,""));
145 if (dialog2) {
146 gSipInterface.mDeadDialogs.push_back(dialog2);
147 }
148 LOG(DEBUG) << LOGVAR(callid) <<LOGVAR(localtag) <<LOGVAR(!!dialog1) <<LOGVAR(!!dialog2);
149 return !!dialog1;
150}
151
152// For outgoing [client] invites the invite should have the local tag already and is put in the map using the localtag.
153// For incoming [server] invites, we add the call dialog initially without the local tag, then later add the localtag to the key

Callers 2

dmPeriodicServiceMethod · 0.80
dialogCancelMethod · 0.80

Calls 2

dsLocalTagMethod · 0.80
push_backMethod · 0.80

Tested by

no test coverage detected