[PATCH] osmo-bsc[master]: libbsc: Use abis_nm_admin_name API

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Thu Oct 19 15:37:19 UTC 2017


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

libbsc: Use abis_nm_admin_name API

Requires libosmocore Ieace734aaff3f07606113feddde65b75202d96d6

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


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/59/4359/1

diff --git a/src/libbsc/abis_nm.c b/src/libbsc/abis_nm.c
index f0dfe9e..a8b1e82 100644
--- a/src/libbsc/abis_nm.c
+++ b/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");
 
@@ -2824,8 +2822,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/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index ca29b4c..10f05af 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -136,7 +136,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/4359
To unsubscribe, visit https://gerrit.osmocom.org/settings

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



More information about the gerrit-log mailing list