[PATCH 3/3] ussd: Changed 7bit test to check spec conformance directly

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/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Thu Aug 8 12:21:03 UTC 2013


On Thu, Aug 08, 2013 at 12:38:54PM +0200, Jacob Erlbeck wrote:

all looks good. thank you for the patches. Some cosmetic nitpick.


> +
> +	OSMO_ASSERT(!strcmp(encoded_hex, osmo_hexdump_nospc(coded, y)));

we tend to use strcmp == 0.

> +
>  	gsm_7bit_decode_ussd(decoded, coded, y * 8 / 7);
>  	y = strlen(decoded);
>  	printf("decoded = %s\n\n", osmo_hexdump((uint8_t *)decoded, y));
> +
> +	OSMO_ASSERT(!strncmp(text, decoded, strlen (text)));


strlen(text) e.g. no space between the opening parethesis

> +	OSMO_ASSERT(!strcmp(appended_after_decode, decoded + strlen (text)));


I am going to apply all three patches now.




More information about the OpenBSC mailing list