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.
| 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. |
| 137 | bool 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 |
no test coverage detected