aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-01-07 19:09:07 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-01-08 15:45:49 +0000
commitef8cdfbacb40dffc78ee7ffde146d4eeceb63caf (patch)
tree69cff5bb1e31ba7af6565fa2a9facfe4b2bc0c5e
parentf28b660666e56b4f803ab97983b60615fb5e63ae (diff)
oml.c: Fix use of htons instead of ntohs
In oml_ipa_mo_set_attr_cell, as well as we do in other set functions in the same file, we want to store a parsed value from a TLV received on the network into a host local structure. We hence need to use ntohs instead of htons. Change-Id: Icbf65f8a4b871b0fa2e84ad6cd2188d4e34f704b
-rw-r--r--src/common/oml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/oml.c b/src/common/oml.c
index ff6dc41..465c416 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -1204,7 +1204,7 @@ static int oml_ipa_mo_set_attr_cell(void *obj, struct tlv_parsed *tp)
if (TLVP_PRES_LEN(tp, NM_ATT_IPACC_BVCI, 2))
bts->gprs.cell.bvci =
- htons(tlvp_val16_unal(tp, NM_ATT_IPACC_BVCI));
+ ntohs(tlvp_val16_unal(tp, NM_ATT_IPACC_BVCI));
if (TLVP_PRES_LEN(tp, NM_ATT_IPACC_RLC_CFG, 9)) {
cur = TLVP_VAL(tp, NM_ATT_IPACC_RLC_CFG);