[MERGED] osmo-bts[master]: oml.c: Fix use of htons instead of ntohs

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
Mon Jan 8 15:45:49 UTC 2018


Pau Espin Pedrol has submitted this change and it was merged.

Change subject: oml.c: Fix use of htons instead of ntohs
......................................................................


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
---
M src/common/oml.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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 @@
 
 	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);

-- 
To view, visit https://gerrit.osmocom.org/5675
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbf65f8a4b871b0fa2e84ad6cd2188d4e34f704b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list