aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/abis_nm.c
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2010-01-02 16:35:26 +0100
committerHarald Welte <laforge@gnumonks.org>2010-01-07 10:36:24 +0100
commit65542c7f597c5c94b16904108056d3c99de1a8cc (patch)
treefbdd051ea308e13e95bcd13263894023e982b29d /openbsc/src/abis_nm.c
parentb1a83585a27c00a33ff1cb30ddeb082515595ba3 (diff)
abis_nm: Consider a STATE CHG without avail_status as an empty avail_status
At least some nanoBTS 139 send the last even (going online) as 'enabled' 'unlocked' but no avail status IE (which I guess mean an empty set, the doc 12.21 isn't that clear about that). Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'openbsc/src/abis_nm.c')
-rw-r--r--openbsc/src/abis_nm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c
index 7a67fdf3b..8789674e0 100644
--- a/openbsc/src/abis_nm.c
+++ b/openbsc/src/abis_nm.c
@@ -813,7 +813,8 @@ static int abis_nm_rx_statechg_rep(struct msgb *mb)
new_state.availability = *TLVP_VAL(&tp, NM_ATT_AVAIL_STATUS);
DEBUGPC(DNM, "AVAIL=%s(%02x) ", nm_avail_name(new_state.availability),
new_state.availability);
- }
+ } else
+ 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 ", nm_adm_name(new_state.administrative));