aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gsm/gsm0808.c4
-rw-r--r--tests/gsm0808/gsm0808_test.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index f9f7b582..02288e6c 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -447,8 +447,8 @@ struct msgb *gsm0808_create_sapi_reject(uint8_t link_id)
return NULL;
msgb_v_put(msg, BSS_MAP_MSG_SAPI_N_REJECT);
- msgb_v_put(msg, link_id);
- msgb_v_put(msg, GSM0808_CAUSE_BSS_NOT_EQUIPPED);
+ msgb_tv_put(msg, GSM0808_IE_DLCI, link_id);
+ gsm0808_enc_cause(msg, GSM0808_CAUSE_BSS_NOT_EQUIPPED);
msg->l3h = msgb_tv_push(msg, BSSAP_MSG_BSS_MANAGEMENT, msgb_length(msg));
diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c
index 2389218a..ec249148 100644
--- a/tests/gsm0808/gsm0808_test.c
+++ b/tests/gsm0808/gsm0808_test.c
@@ -370,7 +370,7 @@ static void test_create_cm_u()
static void test_create_sapi_reject()
{
- static const uint8_t res[] = { 0x00, 0x03, 0x25, 0x03, 0x25 };
+ static const uint8_t res[] = { 0x00, 0x06, 0x25, 0x18, 0x03, 0x04, 0x01, 0x25 };
struct msgb *msg;
printf("Testing creating SAPI Reject\n");