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/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/19117 ) Change subject: gsm_data.h: Use enum type for NM state fields ...................................................................... gsm_data.h: Use enum type for NM state fields Change-Id: I21fa1688a0c8a3788a5ecedd5912f596a69a1beb --- M include/osmo-bts/gsm_data.h M src/common/oml.c 2 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/17/19117/1 diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h index 7b4d456..97f5cde 100644 --- a/include/osmo-bts/gsm_data.h +++ b/include/osmo-bts/gsm_data.h @@ -83,9 +83,9 @@ /* Network Management State */ struct gsm_nm_state { - uint8_t operational; - uint8_t administrative; - uint8_t availability; + enum abis_nm_op_state operational; + enum abis_nm_adm_state administrative; + enum abis_nm_avail_state availability; }; struct gsm_abis_mo { diff --git a/src/common/oml.c b/src/common/oml.c index 5f64d52..63287f0 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -314,6 +314,7 @@ int oml_tx_state_changed(const struct gsm_abis_mo *mo) { struct msgb *nmsg; + uint8_t avail_state; nmsg = oml_msgb_alloc(); if (!nmsg) @@ -323,7 +324,8 @@ msgb_tv_put(nmsg, NM_ATT_OPER_STATE, mo->nm_state.operational); /* 9.4.7 Availability Status */ - msgb_tl16v_put(nmsg, NM_ATT_AVAIL_STATUS, 1, &mo->nm_state.availability); + avail_state = (uint8_t) mo->nm_state.availability; + msgb_tl16v_put(nmsg, NM_ATT_AVAIL_STATUS, 1, &avail_state); /* 9.4.4 Administrative Status -- not in spec but also sent by nanobts */ msgb_tv_put(nmsg, NM_ATT_ADM_STATE, mo->nm_state.administrative); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/19117 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I21fa1688a0c8a3788a5ecedd5912f596a69a1beb Gerrit-Change-Number: 19117 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200703/42ac4b83/attachment.htm>