Change in libosmocore[master]: gsm0808: fix endieness of call identifier

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

dexter gerrit-no-reply at lists.osmocom.org
Fri Jun 5 16:17:51 UTC 2020


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/18694 )


Change subject: gsm0808: fix endieness of call identifier
......................................................................

gsm0808: fix endieness of call identifier

The call identifier in the ASSIGNMENT COMMAND is encoded in the wrong
endieness. Lets not swap the byte order since the endieness matches
already.

Change-Id: I6468e502f552f99ab54aec9d4b1c169fdc0adfb8
Related: OS#4582
---
M src/gsm/gsm0808.c
1 file changed, 2 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/94/18694/1

diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index 23468c3..4c6aca9 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -480,7 +480,6 @@
 	/* See also: 3GPP TS 48.008 3.2.1.1 ASSIGNMENT REQUEST */
 	struct msgb *msg;
 	uint16_t cic_sw;
-	uint32_t ci_sw;
 
 	/* Mandatory emelent! */
 	OSMO_ASSERT(ct);
@@ -515,9 +514,8 @@
 
 	/* AoIP: Call Identifier 3.2.2.105 */
 	if (ci) {
-		ci_sw = osmo_htonl(*ci);
-		msgb_tv_fixed_put(msg, GSM0808_IE_CALL_ID, sizeof(ci_sw),
-				  (uint8_t *) & ci_sw);
+		msgb_tv_fixed_put(msg, GSM0808_IE_CALL_ID, sizeof(*ci),
+				  (uint8_t *) ci);
 	}
 
 	if (kc)

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18694
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6468e502f552f99ab54aec9d4b1c169fdc0adfb8
Gerrit-Change-Number: 18694
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200605/357ae69f/attachment.htm>


More information about the gerrit-log mailing list