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

Method dmAddLocalTag

SIP/SIP2Interface.cpp:116–132  ·  view source on GitHub ↗

Add the local tag to the lookup key for this dialog.

Source from the content-addressed store, hash-verified

114
115// Add the local tag to the lookup key for this dialog.
116void SipDialogMap::dmAddLocalTag(SipDialog *dialog)
117{
118 string callid = dialog->callId(), localtag = dialog->dsLocalTag();
119 devassert(! localtag.empty());
120 ScopedLock lock(mDialogMap.qGetLock());
121 SipDialog *fnd = mDialogMap.getNoBlock(makeTagKey(callid,""));
122 string newkey = makeTagKey(callid, localtag);
123 devassert(fnd == dialog);
124 if (fnd) {
125 mDialogMap.write(newkey,dialog);
126 } else {
127 // If it is a duplicate ACK it will already be moved.
128 if (! mDialogMap.readNoBlock(newkey)) {
129 LOG(ERR) << "Could not find dialog"<<LOGVAR(callid)<<LOGVAR(localtag);
130 }
131 }
132}
133
134// This removes the SipDialog from the map so it will no longer receive SIP messages.
135// It moves it to the mDeadDialogs queue, whence it will be deleted when we

Callers 1

MTWriteHighSideMethod · 0.80

Calls 2

dsLocalTagMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected