diff options
author | Patrick McHardy <kaber@trash.net> | 2010-09-02 16:51:45 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-09-03 04:45:22 +0200 |
commit | 661b96d618276c1292d4d2654b05eb746b1cac14 (patch) | |
tree | 4b9b966a4c2935ae3c0670858098178218628f26 | |
parent | 8a5f1b5c907c9d5ba0d5b68364e38b1c10be0f6c (diff) |
mm: only abort locally initiated transactions on link shurtdown.
A transaction only needs to be aborted for initiated transactions,
fix a segfault when calling (validly) non-existant callbacks.
Signed-off-by: Patrick McHardy <kaber@trash.net>
-rw-r--r-- | src/cc.c | 3 | ||||
-rw-r--r-- | src/mm.c | 5 |
2 files changed, 6 insertions, 2 deletions
@@ -1599,7 +1599,10 @@ static void dect_cc_shutdown(struct dect_handle *dh, struct dect_call *call = container_of(ta, struct dect_call, transaction); cc_debug(call, "shutdown"); + + cc_debug(call, "MNCC_REJECT-ind"); dh->ops->cc_ops->mncc_reject_ind(dh, call, NULL); + dect_call_disconnect_uplane(dh, call); dect_transaction_close(dh, &call->transaction, DECT_DDL_RELEASE_NORMAL); dect_call_destroy(dh, call); } @@ -2054,7 +2054,7 @@ static void dect_mm_locate_abort(struct dect_handle *dh, struct dect_mm_endpoint *mme, struct dect_mm_procedure *mp) { - mm_debug(mme, "MM_ACCESS_LOCATE-cfm: accept: 0"); + mm_debug(mme, "MM_LOCATE-cfm: accept: 0"); dh->ops->mm_ops->mm_locate_cfm(dh, mme, false, NULL); } @@ -3296,7 +3296,8 @@ static void dect_mm_shutdown(struct dect_handle *dh, dect_mm_procedure_complete(dh, mme, mp); if (mme->current == NULL) mme->link = NULL; - proc->abort(dh, mme, mp); + if (mp->role == DECT_TRANSACTION_INITIATOR) + proc->abort(dh, mme, mp); } static const struct dect_nwk_protocol mm_protocol = { |