Used by MMLayer to immediately remove the transaction, without notifying MM layer. An assumption is that the dialog pointer is valid as long as the transaction exists, so we dont zero out the dialog pointer until we kill the dialog.
| 1924 | // An assumption is that the dialog pointer is valid as long as the transaction exists, |
| 1925 | // so we dont zero out the dialog pointer until we kill the dialog. |
| 1926 | void TranEntry::teRemove(CancelCause cause) |
| 1927 | { |
| 1928 | CallState state = getGSMState(); |
| 1929 | |
| 1930 | SipDialog *dialog = getDialog(); |
| 1931 | mDialog = 0; |
| 1932 | |
| 1933 | if (dialog) { |
| 1934 | // For the special case of outbound handover we must destroy the dialog immediately |
| 1935 | // in case a new handover comes back to us in the reverse direction. |
| 1936 | // just drop the dialog, dont send a BYE. |
| 1937 | //bool terminate = (state == CCState::HandoverOutbound); |
| 1938 | if (state == CCState::HandoverOutbound) { |
| 1939 | cause = CancelCauseHandoverOutbound; |
| 1940 | } |
| 1941 | dialog->dialogCancel(cause); // Does nothing if dialog not yet started. |
| 1942 | } |
| 1943 | |
| 1944 | // It is important to make this transaction no longer point at the dialog, because the dialog |
| 1945 | // will not destroy itself while a transaction still points at it. Taking the transaction |
| 1946 | // out of the TransactionTable prevents the dialog from finding the transaction any longer. |
| 1947 | // However to prevent a race we must do this after using the dialog, which we did above. |
| 1948 | setGSMState(CCState::NullState); // redundant, transaction is being deleted. |
| 1949 | gNewTransactionTable.ttRemove(this->tranID()); |
| 1950 | |
| 1951 | while (currentProcedure()) { |
| 1952 | delete tran()->tePopMachine(); |
| 1953 | } |
| 1954 | |
| 1955 | if (mContext) { mContext->mmDisconnectTran(this); } // DANGER: this deletes the transaction as a side effect. |
| 1956 | } |
| 1957 | |
| 1958 | // Send closure messages for a transaction that is known to be a CS transaction, using the specified CC cause. |
| 1959 | // Must only call from the thread running the channel. |
nothing calls this directly
no test coverage detected