Commit Graph

14 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther ca114432be sms: Increment the RP Message Reference for each transaction
Each RP-DATA should have a unique msg reference. Currently 42 is
used for all of these. Remember the last reference we used and
increment it on the next SMS. Do not track if the reference is
still in use a clash is a lot less likely now. First unless SMPP
is used only one SMS is delivered at a time, second the transaction
space is a lot smaller than the one for the reference.
2014-02-20 11:35:56 +01:00
Jacob Erlbeck 1dc022cb62 openbsc: Fix coverity issues
This patch (hopefully) fixes the new defects reported by coverity.

Addresses:
** CID 1156986:  Negative array index read  (NEGATIVE_RETURNS)
/tests/gsm0408/gsm0408_test.c: 419 in test_si_range_helpers()
/tests/gsm0408/gsm0408_test.c: 423 in test_si_range_helpers()
/tests/gsm0408/gsm0408_test.c: 427 in test_si_range_helpers()

** CID 1156987:  Unchecked return value from library
(CHECKED_RETURN)
/src/libmgcp/mgcp_protocol.c: 1150 in mgcp_keepalive_timer_cb()

** CID 1156988:  Unchecked return value from library
(CHECKED_RETURN)
/src/libmgcp/mgcp_protocol.c: 983 in handle_modify_con()

Sponsored-by: On-Waves ehf
2014-01-17 14:36:51 +01:00
Jacob Erlbeck 45014a0cad si: Fix range1024 encoding
f0 is currently set to arfcns[0] in range_enc_determine_range(),
while GSM 04.08 requires f0 to be ARFCN 0 in range1024 encoding.

This patch modifies range_enc_determine_range() to force f0 to be 0
if this encoding is used. This way the case distinction in
range_enc_filter_arfcns() is not longer necessary.

Sponsored-by: On-Waves ehf
2014-01-16 12:04:30 +01:00
Jacob Erlbeck 9444d4f8e2 si/test: Merge si tests into gsm48 tests
Currently tests covering features of the GSM 04.08 specification are
spread over the si and gsm0408 subdirs in tests.

This commit merges all tests from 'si' into 'gsm0408' and removes the
'si' test sub-directory.

Sponsored-by: On-Waves ehf
2014-01-16 12:04:30 +01:00
Jacob Erlbeck 4b903b4afb si/test: Add tests for range encoding/decoding
This commit adds test range encoding tests. They check the property
decoding(encoding(L)) = L and optionally dump the results and
encoded sequences to stdout.

There a 2 test modes:

 - A list of fixed tests
 - A random number based test loop per ARFCN list size (only dumps
   the first failing test)

Sponsored-by: On-Waves ehf
2014-01-16 12:04:29 +01:00
Holger Hans Peter Freyther 300457b7d2 gsm0408: Print message when the test is done 2012-01-06 17:23:19 +01:00
Pablo Neira Ayuso c0d17f2266 src: use namespace prefix osmo_* for misc utils
Summary of changes:

s/bcd2char/osmo_bcd2char/g
s/char2bcd/osmo_char2bcd/g
s/hexparse/osmo_hexparse/g
s/hexdump/osmo_hexdump/g
s/hexdump_nospc/osmo_hexdump_nospc/g
s/ubit_dump/osmo_ubit_dump/g
s/static_assert/osmo_static_assert/g
2011-05-07 12:58:59 +02:00
Holger Hans Peter Freyther c42ad8b686 misc: Move from u_int to uint types of stdint.h
This was done with sed on the files.
2011-04-18 17:31:39 +02:00
Harald Welte f338a03b0c [BSC] Move the BTS-type specific code from bcs_init.c to bts_*.c
bsc_init.c was a big mess even only for two supported BTS models,
so before adding more BTS types, this needs a cleanup.

All the BTS specific code from bsc_init.c has now moved into
bts_{siemens_bs11,ipaccess_nanobts}.c

This has required that input_event() and nm_state_event() get both
converted to proper libosmocore signals instead of referencing external
symbols.
2011-02-11 16:26:31 +01:00
Harald Welte 9af6ddfcec License change: We are now AGPLv3+ instead of GPLv2+
The reason for this is quite simple: We want to make sure anyone
running a customized version of OpenBSC to operate a network will
have to release all custom modifiations to the source code.
2011-01-01 15:39:34 +01:00
Holger Hans Peter Freyther adb6e1cce1 janitor: Move the * to the variable name 2010-09-18 06:44:24 +08:00
Harald Welte afedeabd91 move some gsm48 utility functions to libosmocore
* gsm48_generate_lai() gsm48_generate_mid_from_tmsi() gsm48_generate_mid_from_imsi()
* gsm48_cc_msg_names[]
2010-03-04 10:55:40 +01:00
Holger Hans Peter Freyther 5d0e56f722 [gsm48] Introduce a gsm48_generate_mid_from_imsi method
Prefix generate_mid_from_tmsi with a gsm48_, create a new method
to binary encode the imsi. Add a unit test for parsing and decoding.

The implementation can parse the data it generated and the
last octet seems to be filled with the end mark.
2009-08-20 13:59:14 +02:00
Harald Welte 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00