[PATCH] libosmocore[master]: gsm0808: make gsm0808_create_reset_ack() accessible

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
Wed Apr 5 15:58:57 UTC 2017


Review at  https://gerrit.osmocom.org/2229

gsm0808: make gsm0808_create_reset_ack() accessible

The create function to generate the RESET ACKNOWLEDGE
message is not accessible from outside, as it does not
appear in limosmogsm.map. It also has not testcase.

This commit adds gsm0808_create_reset_ack() to the
map file and also adds a testcase.

Change-Id: I82d3411484f82b4a9205d407fa0442244678f183
---
M src/gsm/libosmogsm.map
M tests/gsm0808/gsm0808_test.c
M tests/gsm0808/gsm0808_test.ok
3 files changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/29/2229/1

diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index a4e6083..c825dd5 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -141,6 +141,7 @@
 gsm0808_create_layer3;
 gsm0808_create_layer3_aoip;
 gsm0808_create_reset;
+gsm0808_create_reset_ack;
 gsm0808_create_sapi_reject;
 gsm0808_prepend_dtap_header;
 gsm0808_enc_aoip_trasp_addr;
diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c
index a0ff6d5..8304052 100644
--- a/tests/gsm0808/gsm0808_test.c
+++ b/tests/gsm0808/gsm0808_test.c
@@ -123,6 +123,18 @@
 	msgb_free(msg);
 }
 
+static void test_create_reset_ack()
+{
+	static const uint8_t res[] = { 0x00, 0x01, 0x31 };
+	struct msgb *msg;
+
+	printf("Testing creating Reset Ack\n");
+	msg = gsm0808_create_reset_ack();
+	VERIFY(msg, res, ARRAY_SIZE(res));
+	msgb_free(msg);
+}
+
+
 static void test_create_clear_command()
 {
 	static const uint8_t res[] = { 0x20, 0x04, 0x01, 0x23 };
@@ -828,6 +840,7 @@
 	test_create_layer3();
 	test_create_layer3_aoip();
 	test_create_reset();
+	test_create_reset_ack();
 	test_create_clear_command();
 	test_create_clear_complete();
 	test_create_cipher();
diff --git a/tests/gsm0808/gsm0808_test.ok b/tests/gsm0808/gsm0808_test.ok
index 52af134..e101d65 100644
--- a/tests/gsm0808/gsm0808_test.ok
+++ b/tests/gsm0808/gsm0808_test.ok
@@ -2,6 +2,7 @@
 Testing creating Layer3
 Testing creating Layer3 (AoIP)
 Testing creating Reset
+Testing creating Reset Ack
 Testing creating Clear Command
 Testing creating Clear Complete
 Testing creating Chipher Mode Command

-- 
To view, visit https://gerrit.osmocom.org/2229
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82d3411484f82b4a9205d407fa0442244678f183
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list