Add the local tag to the lookup key for this dialog.
| 114 | |
| 115 | // Add the local tag to the lookup key for this dialog. |
| 116 | void 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 |
no test coverage detected