[PATCH] osmo-bts[master]: oml, Set Chan Attr: treat unknown PCHAN types as error

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Jun 16 02:39:17 UTC 2016


Review at  https://gerrit.osmocom.org/290

oml, Set Chan Attr: treat unknown PCHAN types as error

Change-Id: Id79585993df15362ba0e1271d03302597182ceff
---
M src/common/oml.c
1 file changed, 9 insertions(+), 3 deletions(-)


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

diff --git a/src/common/oml.c b/src/common/oml.c
index 86ec1bf..bee2f84 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -736,8 +736,9 @@
 		lchan->type = GSM_LCHAN_PDTCH;
 		break;
 	default:
-		/* FIXME */
-		break;
+		LOGP(DOML, LOGL_ERROR, "Unknown/unhandled PCHAN type: %u %s\n",
+		     ts->pchan, gsm_pchan_name(ts->pchan));
+		return -NM_NACK_PARAM_RANGE;
 	}
 	return 0;
 }
@@ -790,7 +791,12 @@
 	if (TLVP_PRESENT(&tp, NM_ATT_CHAN_COMB)) {
 		uint8_t comb = *TLVP_VAL(&tp, NM_ATT_CHAN_COMB);
 		ts->pchan = abis_nm_pchan4chcomb(comb);
-		conf_lchans_for_pchan(ts);
+		rc = conf_lchans_for_pchan(ts);
+		if (rc < 0) {
+			talloc_free(tp_merged);
+			/* Send NACK */
+			return oml_fom_ack_nack(msg, -rc);
+		}
 	}
 
 	/* 9.4.5 ARFCN List */

-- 
To view, visit https://gerrit.osmocom.org/290
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id79585993df15362ba0e1271d03302597182ceff
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list