Change in osmo-bts[master]: [VAMOS] l1sap: get_lchan_by_chan_nr() may return NULL

fixeria gerrit-no-reply at lists.osmocom.org
Tue Jun 1 02:51:26 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/24483 )


Change subject: [VAMOS] l1sap: get_lchan_by_chan_nr() may return NULL
......................................................................

[VAMOS] l1sap: get_lchan_by_chan_nr() may return NULL

Change-Id: Ic309622d0ee818302dfc66d69fd2914ae28261d6
---
M src/common/l1sap.c
1 file changed, 12 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/83/24483/1

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index a47f653..b0cffe5 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -765,6 +765,12 @@
 	struct info_act_cnf_param *info_act_cnf)
 {
 	struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr);
+	if (lchan == NULL) {
+		LOGPTRX(trx, DL1C, LOGL_ERROR, "get_lchan_by_chan_nr(chan_nr=%s) "
+			"yields NULL for PRIM_INFO_ACTIVATE.conf\n",
+			rsl_chan_nr_str(info_act_cnf->chan_nr));
+		return -ENODEV;
+	}
 
 	LOGPLCHAN(lchan, DL1C, LOGL_INFO, "activate confirm chan_nr=%s trx=%d\n",
 		  rsl_chan_nr_str(info_act_cnf->chan_nr), trx->nr);
@@ -788,6 +794,12 @@
 	struct info_act_cnf_param *info_act_cnf)
 {
 	struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr);
+	if (lchan == NULL) {
+		LOGPTRX(trx, DL1C, LOGL_ERROR, "get_lchan_by_chan_nr(chan_nr=%s) "
+			"yields NULL for PRIM_INFO_ACTIVATE.conf\n",
+			rsl_chan_nr_str(info_act_cnf->chan_nr));
+		return -ENODEV;
+	}
 
 	LOGPLCHAN(lchan, DL1C, LOGL_INFO, "deactivate confirm chan_nr=%s trx=%d\n",
 		  rsl_chan_nr_str(info_act_cnf->chan_nr), trx->nr);

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ic309622d0ee818302dfc66d69fd2914ae28261d6
Gerrit-Change-Number: 24483
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210601/fea07e99/attachment.htm>


More information about the gerrit-log mailing list