[MERGED] openbsc[master]: abis_rsl: use msgb_pull to parse tlli from msg

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu May 25 14:43:14 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: abis_rsl: use msgb_pull to parse tlli from msg
......................................................................


abis_rsl: use msgb_pull to parse tlli from msg

Change-Id: I971bf6c8821689f9d8a1294a9b3bf1af9c4091f7
---
M openbsc/src/libbsc/abis_rsl.c
1 file changed, 2 insertions(+), 4 deletions(-)

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



diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 85c92cd..7ee19a7 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -2023,10 +2023,8 @@
 		else if(msg->data[4] != 0xf1)
 			LOGP(DRSL, LOGL_ERROR, "unsupported IMM.ass message format! (please fix)\n");
 		else {
-			tlli =  msg->data[8];
-			tlli |= msg->data[7] << 8;
-			tlli |= msg->data[6] << 16;
-			tlli |= msg->data[5] << 24;
+			msgb_pull(msg, 5); /* drop previous data to use msg_pull_u32 */
+			tlli = msgb_pull_u32(msg);
 			pcu_tx_imm_ass_sent(sign_link->trx->bts, tlli);
 		}
 		break;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I971bf6c8821689f9d8a1294a9b3bf1af9c4091f7
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list