ussd: Verify that parsing is stil working and print the decoded text.

This commit is contained in:
Holger Hans Peter Freyther 2010-10-11 08:49:27 +02:00
parent c88a44f493
commit f632371b76
1 changed files with 5 additions and 0 deletions

View File

@ -66,9 +66,14 @@ static int parse_mangle_ussd(const uint8_t *_data, int len)
int main(int argc, char **argv)
{
struct ussd_request req;
const int size = sizeof(ussd_request);
int i;
gsm0480_decode_ussd_request((struct gsm48_hdr *) ussd_request, size, &req);
printf("Tested if it still works. Text was: %s\n", req.text);
printf("Testing parsing a USSD request and truncated versions\n");
for (i = size; i > sizeof(struct gsm48_hdr); --i) {