dect
/
libdect
Archived
13
0
Fork 0

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>
This commit is contained in:
Patrick McHardy 2010-09-02 16:51:45 +02:00
parent 8a5f1b5c90
commit 661b96d618
2 changed files with 6 additions and 2 deletions

View File

@ -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);
}

View File

@ -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 = {