[PATCH] 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/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Tue Mar 14 14:41:41 UTC 2017


Review at  https://gerrit.osmocom.org/2069

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(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/69/2069/1

diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index e494229..52c231d 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -2043,10 +2043,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: newchange
Gerrit-Change-Id: I971bf6c8821689f9d8a1294a9b3bf1af9c4091f7
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>



More information about the gerrit-log mailing list