From 07b625dd2c2d939c861d45d5838bc9bb32a00e30 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 23 Jan 2012 10:02:58 +0100 Subject: GSM 08.08: change gsm0808_create_classmark_update() prototype The caller explicitly specifies CM2 and CM3, rather than one blob containing both. --- tests/gsm0808/gsm0808_test.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index 50838c84..7e5e97b5 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -136,13 +136,21 @@ static void test_create_cipher_reject() static void test_create_cm_u() { - static const uint8_t res[] = { 0x00, 0x02, 0x54, 0x23 }; + static const uint8_t res[] = { + 0x00, 0x07, 0x54, 0x12, 0x01, 0x23, 0x13, 0x01, 0x42 }; + static const uint8_t res2o[] = { + 0x00, 0x04, 0x54, 0x12, 0x01, 0x23 }; struct msgb *msg; - const uint8_t cm = 0x23; + const uint8_t cm2 = 0x23; + const uint8_t cm3 = 0x42; printf("Testing creating CM U\n"); - msg = gsm0808_create_classmark_update(&cm, 1); + msg = gsm0808_create_classmark_update(&cm2, 1, &cm3, 1); VERIFY(msg, res, ARRAY_SIZE(res)); + + msg = gsm0808_create_classmark_update(&cm2, 1, NULL, 0); + VERIFY(msg, res2o, ARRAY_SIZE(res2o)); + msgb_free(msg); } -- cgit v1.2.3