From 419684e30c2fe12d3e3441cfa9fea21f1c4de959 Mon Sep 17 00:00:00 2001 From: Tobias Engel Date: Thu, 8 Mar 2012 13:31:52 +0100 Subject: Supplementary Services (de)activation, interrogation added These patches enhance the Supplementary Service (SS) processing from only being able to handle USSD to other SS, specifically activation, deactivation and interrogation of those SS. Registration is not yet implemented. include/osmocom/gsm/protocol/gsm_09_02.h has been added with needed values for SS. Modified by Harald Welte to keep the old ussd-only functiosn for API/ABI stability. --- tests/ussd/ussd_test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/ussd/ussd_test.c b/tests/ussd/ussd_test.c index b04f8e8a..f798e37c 100644 --- a/tests/ussd/ussd_test.c +++ b/tests/ussd/ussd_test.c @@ -38,13 +38,13 @@ static int parse_ussd(const uint8_t *_data, int len) { uint8_t *data; int rc; - struct ussd_request req; + struct ss_request req; struct gsm48_hdr *hdr; data = malloc(len); memcpy(data, _data, len); hdr = (struct gsm48_hdr *) &data[0]; - rc = gsm0480_decode_ussd_request(hdr, len, &req); + rc = gsm0480_decode_ss_request(hdr, len, &req); free(data); return rc; @@ -54,14 +54,14 @@ static int parse_mangle_ussd(const uint8_t *_data, int len) { uint8_t *data; int rc; - struct ussd_request req; + struct ss_request req; struct gsm48_hdr *hdr; data = malloc(len); memcpy(data, _data, len); hdr = (struct gsm48_hdr *) &data[0]; hdr->data[1] = len - sizeof(*hdr) - 2; - rc = gsm0480_decode_ussd_request(hdr, len, &req); + rc = gsm0480_decode_ss_request(hdr, len, &req); free(data); return rc; @@ -113,15 +113,15 @@ static void test_7bit_ussd(const char *text, const char *encoded_hex, const char int main(int argc, char **argv) { - struct ussd_request req; + struct ss_request req; const int size = sizeof(ussd_request); int i; struct msgb *msg; osmo_init_logging(&info); - gsm0480_decode_ussd_request((struct gsm48_hdr *) ussd_request, size, &req); - printf("Tested if it still works. Text was: %s\n", req.text); + gsm0480_decode_ss_request((struct gsm48_hdr *) ussd_request, size, &req); + printf("Tested if it still works. Text was: %s\n", req.ussd_text); printf("Testing parsing a USSD request and truncated versions\n"); -- cgit v1.2.3