| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The number of digits is the number of used octets times two (two
digits per octet). The result has been successfully dissected by
wireshark. It has not been tested with real phones.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 7bit<->8bit encoding/decoding functions didn't check whether
there is still enough space in the destination buffer. Therefore a
buffer size parameter has been added to each of the functions which
is used to truncate the output if the buffer is too small.
In addition, the return value of the decoding functions has been
changed to number of characters written (excluding \0), so this
value is always equal to strlen(decoded).
The old functions are still available as wrapper functions.
|
|
|
|
|
|
|
| |
This is required for encoding the SMS header using the alpha numeric
rules.
Reviewed-by: Jacob Erlbeck <jerlbeck@sysmocom.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using a ./configure parameter to decide whehter to build
tests or not, use the check_PROGRAMS variable so that the tests are
only built when running `make check`.
To avoid slowing down the test phase itself, collapse the declaration
of the test targets in the tests/Makefile.am file, this way they can
be built and linked in parallel before the testsuite is executed.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The output of make check is looking like this now:
Regression tests.
1: bits ok
2: msgfile ok
3: sms ok
4: smscb ok
5: timer FAILED (testsuite.at:38)
6: ussd FAILED (testsuite.at:44)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additionally it wasn't possible to send concatenated sms from the vty.
To send multiple sms, it is necessary to use padding bits and add a user_data_header.
Therefore the gsm_7bit_encode function was splitted to gsm_7bit_encode and gsm_septets2octets.
gsm_septets2octets: this is the old gsm_7bit_encode function + additional padding parameter
Additionally the gsm_7bit_decode function was modified to take account for the user_data_header.
With the new gsm_get_octet_len function you can get the octet length for a given septet length.
I also added several sms tests.
|
|
|
|
|
| |
We used this include for the u_int{8,16,32}_t types but we do
not need this anymore.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch moves all GSM-specific definitions to include/osmocom/gsm.
Moreover, the headers in include/osmocore/ have been moved to
include/osmocom/core.
This has been proposed by Harald Welte and Sylvain Munaunt.
Tested with `make distcheck'.
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
|
|
|
|
|
|
|
|
|
|
| |
libosmogsm which is provided by libosmocore.
I have also moved generate_backtrace() to backtrace.c instead
of gsm_utils.c, otherwise the timer and msgfile tests depend on
libosmogsm.
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
|
|
|
|
|
|
|
|
|
| |
make sure to return the number of actually written bytes gsm_7bit_decode:
calculate length of resulting septets from input length before decoding
The input length to gsm_7bit_decode reflects the number of encoded bytes
to be decoded. As the decoding is done on the input in septetes we need
to take this into account and recalculate the length.
|
|
|
|
|
|
| |
Use the current test result as test data for future
regression testing. The encode function appears to
add too many zeros to the text.
|
|
|
|
| |
previous code produced wrong encodings for certain characters.
|
| |
|
|
|