On Sun, Jul 07, 2013 at 09:08:26AM +0200, Holger Hans Peter Freyther wrote:
2.) The semantic of the change is bad.
- octet_len = response_len*7/8;
- if (response_len*7%8 != 0)
octet_len++;- /* Warning, response_len indicates the amount of septets
* (characters), we need amount of octets occupied */
I have reverted the two changes and rebased my zecke/features/alpha-numeric branch. Please review the two commits of the branch. In regard to the USSD fixes I would propose the following:
* We introduce a new API function that will handle the specifics of the USSD packing (last 7bit unused, last 7bit <CR>). The signature could be:
int gsm_7bit_encode_ussd(uint8_t *result, const char *data, int *octets_written); int gsm_7bit_decode_ussd(char *decoded, const uint8_t *user_data, uint8_t length);
* Add a testcase for the above (e.g. '1234567\r' should result in a double \r\r). * Switch the USSD code in libosmocore over
I would argue that writing a regression test is industry standard and basic software engineering but running "make check" after doing a change is absolutely basic.
holger