Change in osmo-bsc[master]: lchan_release(): do not release UNUSED lchan

neels gerrit-no-reply at lists.osmocom.org
Fri Apr 30 14:22:21 UTC 2021


neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/23941 )

Change subject: lchan_release(): do not release UNUSED lchan
......................................................................

lchan_release(): do not release UNUSED lchan

I noticed that lchan_release() is generally called in varying error
situations, so it makes sense to generally skip the release procedure
when the lchan is already in the UNUSED state.

Change-Id: I6e9faf682d1668388d5470419110408a098b9900
---
M src/osmo-bsc/lchan_fsm.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve



diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index d58aac5..d2b7172 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -1592,7 +1592,7 @@
 		   bool err, enum gsm48_rr_cause cause_rr,
 		   const struct osmo_plmn_id *last_eutran_plmn)
 {
-	if (!lchan || !lchan->fi)
+	if (!lchan || !lchan->fi || lchan->fi->state == LCHAN_ST_UNUSED)
 		return;
 
 	if (lchan->release.in_release_handler)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/23941
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I6e9faf682d1668388d5470419110408a098b9900
Gerrit-Change-Number: 23941
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210430/7b6eedb3/attachment.htm>


More information about the gerrit-log mailing list