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/.
Holger Freyther gerrit-no-reply at lists.osmocom.orgHolger Freyther has submitted this change and it was merged. Change subject: ussd: Decode interrogateSS that doesn't have test ...................................................................... ussd: Decode interrogateSS that doesn't have test Keith of Rhizomatica has an issue of a unrejected interrogateSS. Start with just decoding the message and printing the empty test and the code. What is kind of missing is the classification between invoke, returnResult and returnResultLast that we need to add in the long run. Change-Id: Iadfa156707a96f2a34f3948c7cc9a74435f17114 --- M tests/ussd/ussd_test.c M tests/ussd/ussd_test.ok 2 files changed, 13 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/tests/ussd/ussd_test.c b/tests/ussd/ussd_test.c index f798e37..40b4317 100644 --- a/tests/ussd/ussd_test.c +++ b/tests/ussd/ussd_test.c @@ -34,6 +34,12 @@ 0x01, 0x7f, 0x01, 0x00 }; +static const uint8_t interrogate_ss[] = { + 0x0b, 0x7b, 0x1c, 0x0d, 0xa1, 0x0b, 0x02, 0x01, + 0x03, 0x02, 0x01, 0x0e, 0x30, 0x03, 0x04, 0x01, + 0x21, 0x7f, 0x01, 0x00 +}; + static int parse_ussd(const uint8_t *_data, int len) { uint8_t *data; @@ -120,9 +126,15 @@ osmo_init_logging(&info); + memset(&req, 0, sizeof(req)); gsm0480_decode_ss_request((struct gsm48_hdr *) ussd_request, size, &req); printf("Tested if it still works. Text was: %s\n", req.ussd_text); + memset(&req, 0, sizeof(req)); + gsm0480_decode_ss_request((struct gsm48_hdr *) interrogate_ss, size, &req); + OSMO_ASSERT(strlen((char *) req.ussd_text) == 0); + OSMO_ASSERT(req.ss_code == 33); + printf("interrogateSS CFU text..'%s' code %d\n", req.ussd_text, req.ss_code); printf("Testing parsing a USSD request and truncated versions\n"); diff --git a/tests/ussd/ussd_test.ok b/tests/ussd/ussd_test.ok index 54d59ee..69ea53c 100644 --- a/tests/ussd/ussd_test.ok +++ b/tests/ussd/ussd_test.ok @@ -1,4 +1,5 @@ Tested if it still works. Text was: **321# +interrogateSS CFU text..'' code 33 Testing parsing a USSD request and truncated versions Result for 1 is 28 Result for 1 is 27 -- To view, visit https://gerrit.osmocom.org/502 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iadfa156707a96f2a34f3948c7cc9a74435f17114 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther <holger at freyther.de> Gerrit-Reviewer: Holger Freyther <holger at freyther.de> Gerrit-Reviewer: Jenkins Builder