[PATCH] openbsc[master]: libbsc: Use abis_nm_admin_name API

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Thu Oct 19 16:07:18 UTC 2017


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

libbsc: Use abis_nm_admin_name API

Requires libosmocore Ieace734aaff3f07606113feddde65b75202d96d6

Cherry-picked from osmo-bsc 7bf75dcfb98366b1f23d390a350faa836e00f817

Change-Id: I2dccebef2f7fc745b845a49d723f5d89fc2baa41
---
M openbsc/src/libbsc/abis_nm.c
M openbsc/src/libbsc/bsc_vty.c
2 files changed, 4 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/62/4362/1

diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c
index f24f6bf..35b58bb 100644
--- a/openbsc/src/libbsc/abis_nm.c
+++ b/openbsc/src/libbsc/abis_nm.c
@@ -237,9 +237,7 @@
 		new_state.availability = 0xff;
 	if (TLVP_PRESENT(&tp, NM_ATT_ADM_STATE)) {
 		new_state.administrative = *TLVP_VAL(&tp, NM_ATT_ADM_STATE);
-		DEBUGPC(DNM, "ADM=%2s ",
-			get_value_string(abis_nm_adm_state_names,
-					 new_state.administrative));
+		DEBUGPC(DNM, "ADM=%2s ", abis_nm_admin_name(new_state.administrative));
 	}
 	DEBUGPC(DNM, "\n");
 
@@ -2796,8 +2794,8 @@
 	uint8_t new_state = locked ? NM_STATE_LOCKED : NM_STATE_UNLOCKED;
 
 	LOGP(DNM, LOGL_NOTICE, "(bts=%d,trx=%d) Changing adm. state %s -> %s [%s]\n", trx->bts->nr, trx->nr,
-	     get_value_string(abis_nm_adm_state_names, trx->mo.nm_state.administrative),
-	     get_value_string(abis_nm_adm_state_names, new_state), reason);
+	     abis_nm_admin_name(trx->mo.nm_state.administrative),
+	     abis_nm_admin_name(new_state), reason);
 
 	trx->mo.nm_state.administrative = new_state;
 	if (!trx->bts || !trx->bts->oml_link)
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 200f633..db3759e 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -135,7 +135,7 @@
 {
 	vty_out(vty,"Oper '%s', Admin '%s', Avail '%s'%s",
 		abis_nm_opstate_name(nms->operational),
-		get_value_string(abis_nm_adm_state_names, nms->administrative),
+		abis_nm_admin_name(nms->administrative),
 		abis_nm_avail_name(nms->availability), VTY_NEWLINE);
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dccebef2f7fc745b845a49d723f5d89fc2baa41
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>


More information about the gerrit-log mailing list