aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/abis_nm.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-06-09 17:15:45 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-27 03:52:45 +0200
commite3dbd5d33a75ea363f4c64bb926b961349055df1 (patch)
treecbc49d61855019902f1cb072f4a689a0fa5dce26 /src/libbsc/abis_nm.c
parent47a50320a4a7870a7e24006dcb87b8b5e2f16c41 (diff)
Fix BTS attribute requests
* fix BTS numbers: use 0 to indicate given BTS and 0xFF to indicate all BTS' as it's explained in 3GPP TS 52.021 ยง9.3. * only request attributes from supported (OsmoBTS) types Change-Id: I8f43055c38000248033a8ff9ddaf0910d68d794b Related: OS#2317
Diffstat (limited to 'src/libbsc/abis_nm.c')
-rw-r--r--src/libbsc/abis_nm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index 019d03952..cf20d7c49 100644
--- a/src/libbsc/abis_nm.c
+++ b/src/libbsc/abis_nm.c
@@ -1590,10 +1590,17 @@ int abis_nm_get_attr(struct gsm_bts *bts, uint8_t obj_class, uint8_t bts_nr, uin
const uint8_t *attr, uint8_t attr_len)
{
struct abis_om_hdr *oh;
- struct msgb *msg = nm_msgb_alloc();
+ struct msgb *msg;
+
+ if (bts->type != GSM_BTS_TYPE_OSMOBTS) {
+ LOGPC(DNM, LOGL_NOTICE, "Getting attributes from BTS%d type %s is not supported.\n",
+ bts->nr, btstype2str(bts->type));
+ return -EINVAL;
+ }
DEBUGP(DNM, "Get Attr (bts=%d)\n", bts->nr);
+ msg = nm_msgb_alloc();
oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
fill_om_fom_hdr(oh, attr_len, NM_MT_GET_ATTR, obj_class,
bts_nr, trx_nr, ts_nr);