Max has submitted this change and it was merged.

Change subject: Don't drop OML links for Get Attributes NACK
......................................................................


Don't drop OML links for Get Attributes NACK

Previously any OML NACK message will result in BSC dropping OML link to
BTS which makes it impossible to use optional OML messages which might
be unsupported by BTS. Fix this for 3GPP TS 52.021 ยง8.11.1 Get
Attributes message. Also, log human-readable NACK name to see what
exactly causing OML link drop.

Change-Id: Ib8af2872c27abb793172ec59bdc145b8d54f83da
Related: OS#1614
---
M openbsc/src/libbsc/bsc_init.c
1 file changed, 10 insertions(+), 10 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index b17ff79..521fc89 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -44,19 +44,19 @@
 /* Callback function for NACK on the OML NM */
 static int oml_msg_nack(struct nm_nack_signal_data *nack)
 {
-       if (nack->mt == NM_MT_SET_BTS_ATTR_NACK) {
-
-               LOGP(DNM, LOGL_ERROR, "Failed to set BTS attributes. That is 
fatal. "
-                               "Was the bts type and frequency properly 
specified?\n");
-               goto drop_bts;
-       } else {
-               LOGP(DNM, LOGL_ERROR, "Got a NACK going to drop the OML 
links.\n");
-               goto drop_bts;
+       if (nack->mt == NM_MT_GET_ATTR_NACK) {
+               LOGP(DNM, LOGL_ERROR, "BTS%u does not support Get Attributes "
+                    "OML message.\n", nack->bts->nr);
+               return 0;
        }
 
-       return 0;
+       if (nack->mt == NM_MT_SET_BTS_ATTR_NACK)
+               LOGP(DNM, LOGL_ERROR, "Failed to set BTS attributes. That is 
fatal. "
+                    "Was the bts type and frequency properly specified?\n");
+       else
+               LOGP(DNM, LOGL_ERROR, "Got %s NACK going to drop the OML 
links.\n",
+                    abis_nm_nack_name(nack->mt));
 
-drop_bts:
        if (!nack->bts) {
                LOGP(DNM, LOGL_ERROR, "Unknown bts. Can not drop it.\n");
                return 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8af2872c27abb793172ec59bdc145b8d54f83da
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max <msur...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msur...@sysmocom.de>

Reply via email to