aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gsm0808
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-06-05 14:16:11 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2020-06-09 12:36:38 +0200
commit2908dbfddd0dd89df34e876d417fe1d8f085408d (patch)
tree441f398595da02377a170680729fd27ae72165c0 /tests/gsm0808
parentef5b9b64342510278f795fedb9ec026f212587a8 (diff)
gsm0808: fix endieness of call identifier
The call identifier in the ASSIGNMENT COMMAND is encoded in the wrong endieness. 3GPP TS 48.008, section 3.2.2.105 specifies that the least significant byte should be transmitted first, which means that the endieness here is little endian. Lets make sure that the endieness is correctly transmitted, regardless of the host byte order. Change-Id: I6468e502f552f99ab54aec9d4b1c169fdc0adfb8 Related: OS#4582
Diffstat (limited to 'tests/gsm0808')
-rw-r--r--tests/gsm0808/gsm0808_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c
index d9640aa3..5c1a9313 100644
--- a/tests/gsm0808/gsm0808_test.c
+++ b/tests/gsm0808/gsm0808_test.c
@@ -438,8 +438,8 @@ static void test_create_ass()
0x04, GSM0808_IE_AOIP_TRASP_ADDR, 0x06, 0xc0, 0xa8, 0x64, 0x17,
0x04, 0xd2, GSM0808_IE_SPEECH_CODEC_LIST, 0x07,
GSM0808_SCT_FR3 | 0x50, 0xef, 0xcd, GSM0808_SCT_FR2 | 0xa0, 0x9f,
- GSM0808_SCT_CSD | 0x90, 0xc0, GSM0808_IE_CALL_ID, 0xaa, 0xbb,
- 0xcc, 0xdd };
+ GSM0808_SCT_CSD | 0x90, 0xc0, GSM0808_IE_CALL_ID, 0xdd, 0xcc,
+ 0xbb, 0xaa };
struct msgb *msg;
struct gsm0808_channel_type ct;
@@ -499,7 +499,7 @@ static void test_create_ass2()
GSM0808_SCT_CSD | 0x90,
0xc0,
GSM0808_IE_CALL_ID,
- 0xde, 0xad, 0xfa, 0xce, /* CallID */
+ 0xce, 0xfa, 0xad, 0xde, /* CallID */
0x83, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, 0x45, /* Kc */
GSM0808_IE_GLOBAL_CALL_REF, 0x0d, /* GCR, length */
0x03, 0x44, 0x44, 0x44, /* GCR, Net ID */