jolly has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/38513?usp=email ) Change subject: Release BSS connection when CC transaction fails ...................................................................... Release BSS connection when CC transaction fails When the creation of the transaction structure fails, the MSC will send a RELEASE COMPLETE message. This patch ensures that the MSC_A use counter is decremented, so that the BSS connection is released, if it is not used by any other transaction. Without this patch, the msc_a_fsm would wait 5 seconds for an initial transaction before releasing the BSS connection. Related: OS#6427 Change-Id: Icb893d5c1ce4c77a29259ce66189576dcaa5a44a --- M src/libmsc/gsm_04_08_cc.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index e144b47..467305d 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -2649,6 +2649,9 @@ if (!vsub) { LOG_TRANS(trans, LOGL_ERROR, "Invalid conn: no subscriber\n"); + /* Decrement use counter that has been incremented by CM Service Request (CC). + * If there is no other service request, the BSS connection will be released. */ + msc_a_put(msc_a, MSC_A_USE_CM_SERVICE_CC); return -EINVAL; } @@ -2666,6 +2669,9 @@ rc = gsm48_tx_simple(msc_a, GSM48_PDISC_CC | (transaction_id << 4), GSM48_MT_CC_RELEASE_COMPL); + /* Decrement use counter that has been incremented by CM Service Request (CC). + * If there is no other service request, the BSS connection will be released. */ + msc_a_put(msc_a, MSC_A_USE_CM_SERVICE_CC); return -ENOMEM; } if (osmo_fsm_inst_dispatch(msc_a->c.fi, MSC_A_EV_TRANSACTION_ACCEPTED, trans)) { -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38513?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Icb893d5c1ce4c77a29259ce66189576dcaa5a44a Gerrit-Change-Number: 38513 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas@eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: jolly <andreas@eversberg.eu> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: pespin <pespin@sysmocom.de>