aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmo-bts/gsm_data.h6
-rw-r--r--src/common/oml.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 7b4d4569..97f5cde4 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -83,9 +83,9 @@ struct smscb_msg;
/* 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 5f64d526..63287f06 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -314,6 +314,7 @@ static int oml_tx_attr_resp(const struct gsm_abis_mo *mo,
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 @@ int oml_tx_state_changed(const struct gsm_abis_mo *mo)
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);