Review at https://gerrit.osmocom.org/2526
Use libvlr in libmsc (large refactoring) Original libvlr code is by Harald Welte <lafo...@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofm...@sysmocom.de>. This is a long series of development collapsed in one patch. The original history may still be available as branch neels/vlr_orig. TODO: This commit may be split in several smaller changes before merging to master. SMS: The SQL based lookup of SMS for attached subscribers no longer works since the SQL database no longer has the subscriber data. Replace with a round-robin on the SMS recipient MSISDNs paired with a VLR subscriber RAM lookup whether the subscriber is currently attached. If there are many SMS for not-attached subscribers in the SMS database, this will become inefficient: a DB hit returns a pending SMS, the RAM lookup will reveal that the subscriber is not attached, after which the DB is hit for the next SMS. It would become more efficient e.g. by having an MSISDN based hash list for the VLR subscribers and by marking non-attached SMS recipients in the SMS database so that they can be excluded with the SQL query already. There is a sanity limit to do at most 100 db hits per attempt to find a pending SMS. So if there are more than 100 stored SMS waiting for their recipients to actually attach to the MSC, it may take more than one SMS queue trigger to deliver SMS for subscribers that are actually attached. This is not very beautiful, but is merely intended to carry us over to a time when we have a proper separate SMSC entity. Introduce gsm_subscriber_connection ref-counting in libmsc. Related: OS#1592 Change-Id: I702ba504ce2de93507312c28eca8d11f09f4ee8b --- M openbsc/configure.ac M openbsc/include/openbsc/abis_rsl.h M openbsc/include/openbsc/auth.h M openbsc/include/openbsc/bsc_api.h M openbsc/include/openbsc/chan_alloc.h M openbsc/include/openbsc/db.h M openbsc/include/openbsc/debug.h M openbsc/include/openbsc/gsm_04_08.h M openbsc/include/openbsc/gsm_04_11.h M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/gsm_data_shared.h M openbsc/include/openbsc/gsm_subscriber.h M openbsc/include/openbsc/osmo_msc.h M openbsc/include/openbsc/signal.h M openbsc/include/openbsc/silent_call.h M openbsc/include/openbsc/transaction.h M openbsc/include/openbsc/vlr.h M openbsc/include/openbsc/vty.h M openbsc/src/libbsc/abis_rsl.c M openbsc/src/libbsc/bsc_api.c M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/handover_logic.c M openbsc/src/libbsc/paging.c M openbsc/src/libcommon-cs/common_cs.c M openbsc/src/libcommon-cs/common_cs_vty.c M openbsc/src/libcommon/debug.c M openbsc/src/libcommon/gsm_data.c M openbsc/src/libcommon/gsm_subscriber_base.c M openbsc/src/libcommon/gsup_client.c M openbsc/src/libmsc/Makefile.am M openbsc/src/libmsc/auth.c M openbsc/src/libmsc/ctrl_commands.c M openbsc/src/libmsc/db.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/gsm_04_11.c M openbsc/src/libmsc/gsm_subscriber.c M openbsc/src/libmsc/meas_feed.c M openbsc/src/libmsc/osmo_msc.c M openbsc/src/libmsc/rrlp.c M openbsc/src/libmsc/silent_call.c M openbsc/src/libmsc/smpp_openbsc.c M openbsc/src/libmsc/sms_queue.c M openbsc/src/libmsc/subscr_conn.c M openbsc/src/libmsc/token_auth.c M openbsc/src/libmsc/transaction.c M openbsc/src/libmsc/ussd.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/src/libvlr/vlr_access_req_fsm.c M openbsc/src/osmo-nitb/bsc_hack.c M openbsc/tests/Makefile.am M openbsc/tests/channel/Makefile.am M openbsc/tests/channel/channel_test.c M openbsc/tests/channel/channel_test.ok M openbsc/tests/db/db_test.c M openbsc/tests/mm_auth/mm_auth_test.c M openbsc/tests/mm_auth/mm_auth_test.ok A openbsc/tests/sms_queue/Makefile.am A openbsc/tests/sms_queue/sms_queue_test.c A openbsc/tests/sms_queue/sms_queue_test.err A openbsc/tests/sms_queue/sms_queue_test.ok M openbsc/tests/subscr/Makefile.am D openbsc/tests/subscr/subscr_test.c D openbsc/tests/subscr/subscr_test.ok M openbsc/tests/testsuite.at M openbsc/tests/vty_test_runner.py 66 files changed, 2,172 insertions(+), 3,857 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/26/2526/1 -- To view, visit https://gerrit.osmocom.org/2526 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I702ba504ce2de93507312c28eca8d11f09f4ee8b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: vlr_3G Gerrit-Owner: daniel <dwillm...@sysmocom.de>