gsm0808_enc/dec_channel_type: fix transparent flag
According to 3GPP TS 48.008 3.2.2.11, it is inverted.
0: Transparent service
1: Non-transparent service
Change-Id: I2e5786ad053ee871079b4a8d95caccd6b03b59b6
diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c
index 9a6de1e..d7c278f 100644
--- a/tests/gsm0808/gsm0808_test.c
+++ b/tests/gsm0808/gsm0808_test.c
@@ -1098,7 +1098,7 @@
struct gsm0808_channel_type dec_ct = {};
struct msgb *msg;
uint8_t ct_enc_expected[] = { GSM0808_IE_CHANNEL_TYPE,
- 0x03, 0x02, 0x0b, 0x51,
+ 0x03, 0x02, 0x0b, 0x11,
};
uint8_t rc_enc;
int rc_dec;
@@ -1142,7 +1142,7 @@
struct gsm0808_channel_type dec_ct = {};
struct msgb *msg;
uint8_t ct_enc_expected[] = { GSM0808_IE_CHANNEL_TYPE,
- 0x05, 0x02, 0x0b, 0x91, 0x8b, 0x20,
+ 0x05, 0x02, 0x0b, 0xd1, 0x8b, 0x20,
};
uint8_t rc_enc;
int rc_dec;
@@ -1237,17 +1237,17 @@
OSMO_ASSERT(rc == -ENOTSUP);
/* Data: ext in Octet 5 with transparent service */
- const uint8_t hex2[] = { 0x02, 0x0b, 0xc0, 0x00 };
+ const uint8_t hex2[] = { 0x02, 0x0b, 0x80, 0x00 };
rc = gsm0808_dec_channel_type(&ct, hex2, sizeof(hex2));
OSMO_ASSERT(rc == -EINVAL);
/* Data: ext in Octet 5, but too short */
- const uint8_t hex3[] = { 0x02, 0x0b, 0x80 };
+ const uint8_t hex3[] = { 0x02, 0x0b, 0xc0 };
rc = gsm0808_dec_channel_type(&ct, hex3, sizeof(hex3));
OSMO_ASSERT(rc == -EOVERFLOW);
/* Data: ext in Octet 5a, but too short */
- const uint8_t hex4[] = { 0x02, 0x0b, 0x80, 0x80 };
+ const uint8_t hex4[] = { 0x02, 0x0b, 0xc0, 0x80 };
rc = gsm0808_dec_channel_type(&ct, hex4, sizeof(hex4));
OSMO_ASSERT(rc == -EOVERFLOW);