aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/osmo_msc.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-16debug log: upon bumping a conn, say why it is keptNeels Hofmeyr1-1/+5
Change-Id: I378af1fa06d8a45c01a80a381be143572e1dc41f
2017-03-16remove cruft: old anchor and auth codeNeels Hofmeyr1-2/+0
Change-Id: I16ceeeede46f244fd454758cc223673dd51cfc72
2017-03-16mostly cosmetic: have one msc_conn_close() with cause argumentNeels Hofmeyr1-2/+6
Change-Id: Ied7663f856cfce6e7ed1c0314fd558af85091dcc
2017-03-16Reinstate msc subscriber conn ref countingNeels Hofmeyr1-31/+34
Indeed the easiest way of ensuring all code paths can cause conn discarding while still all code paths can check on whether a conn needs to be discarded. Change-Id: I641fe36d9fa2077e3caf63cc583aaa380603bff0
2017-03-16msc: decouple from bsc_api and btsNeels Hofmeyr1-4/+4
Change-Id: I3564291a6d20da13a8d75c71b0c425da4948d412
2017-03-16Make the code work so that the msc_vlr tests passNeels Hofmeyr1-49/+11
Change-Id: Ie8814d856bbe4c111007a696a4d26576854c134f
2017-03-16IuCS: rapidly release connectionsNeels Hofmeyr1-0/+1
Do the same as we do in 2G: release the connection as soon as nothing else is pending for a given subscriber. Before, osmo-msc would wait for the UE "to get bored" and send an Iu release. But the CN should stay lean on connections. Also, 25.413[1] in section 7, 6th point states: "While the Iu release is managed from the CN, the RNC has the capability to request the release of all Iu connection resources from the corresponding Iu connection." So far we did not manage Iu release from osmo-msc at all. Use the same mechanism we use in 2G: from msc_release_connection(), just before freeing the gsm_subscriber_conn, invoke a CN initiated Iu Release command to the UE. This works around OS#1816 ("USSD only works when IuCS is released", on nano3G), because the Iu conn is now released right after every signalling, so that typically no two requests will use the same conn. In iu.h/iu.c, add iu_tx_release(), absorbing almost all of the code from ranap_handle_co_iu_rel_req(). Add stub to db_test.c, necessary to build it without linking libiu. [1] 3GPP TS 25.413 v12.4.0 Release 12 / ETSI TS 125 413 V12.4.0 (2015-04) Related: OS#1816 Change-Id: Ic12bd6f3666f6fd42bd6d9fdae1c93abee3b6786
2017-03-16msc_compl_l3(): publish in .h, tweak return valueNeels Hofmeyr1-10/+12
Use new libmsc enum values for return val, to avoid dependency on libbsc headers. Make callable from other scopes: publish in osmo_msc.h and remove 'static' in osmo_msc.c Change-Id: If24007445899e9c75553a0dbf843ada3566b3380
2017-03-16Use libvlr in libmsc (large refactoring)Neels Hofmeyr1-61/+186
Original libvlr code is by Harald Welte <laforge@gnumonks.org>, polished and tweaked by Neels Hofmeyr <nhofmeyr@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. Related: OS#1592 Change-Id: I702ba504ce2de93507312c28eca8d11f09f4ee8b
2017-03-16Introduce subscriber_connection ref-countingHarald Welte1-5/+36
This introduces a reference count for gsm_subscriber_connection. Every user of the connection needs to hold a reference until done. Once the reference count dorps to zero, the connection is cleared towards the BSC (which subsequently will clear any logical channels associated with it). Related: OS#1592 Change-Id: I8c05e6c81f246ff8b5bf91312f80410b1a85f15e
2017-01-26various comment / whitespace tweaks (libmsc, gprs, libcommon-cs)Neels Hofmeyr1-1/+1
cosmetic ws in common_cs_vty.c, osmo_msc.c comment: tiny typo fix in gsm_04_08.c In comments, drop some unbalanced braces, because simplistic C file harvesters will break at a single opening brace even if it is in a comment. This is aimed at the fsm-to-dot.py script in libosmocore/contrib. Change-Id: I3c1fa53195a1e57d6fe0a6791c346d30ceff1251
2016-12-02split subscr_con_allocate()/_free() in bsc_ and msc_Neels Hofmeyr1-1/+1
Rename current subscr_con_allocate() and subscr_con_free to bsc_*, and add two separate msc_subscr_con_allocate() and _free(). The msc_subscr_con_free() ignores all lchan members. In libbsc use bsc_*, in libmsc use msc_*. Change-Id: I3cf7c7cafdf4672ec7b26058bba8a77159855257 Future: there will be distinct subscr conns for libbsc and libmsc.
2016-02-10msc: Remove oversimplified todo entry and add a commentHolger Hans Peter Freyther1-1/+5
Add a comment of why we want to accept this connection anyway.
2015-04-29sub: Remove the queue from the subscriber codeHolger Hans Peter Freyther1-8/+0
The idea of "subscriber_get_channel" was that different requests would be coordinated. At the same time we have seen that the "queue" can get stuck at both 31C3 and the rhizomatica installations. Voice calls and SMS do not need coordination. We should be able to send SMS on a voice channel and switch the MS from a SDCCH to a TCH in case we establish a voice call. The SMS code itself needs to coordinate to obey the limit of one SMS per direction but this should be enforced in the sms layer and not on the subscriber. Modify the code to have a simple paging coordination. The subscriber code will schedule the paging and register who would like to know about success/failure. This allowed to greatly simplify the paging response handling for the transaction code (and in fact we could move the transaction list into the subscriber structure now). The code gained to support to cancel the notification of a request (but not the paging itself yet). TODO: Cancel paging request in case no one cares about it anymore.
2014-01-31sms/dtap: Add log messages to analyse SMS message lossJacob Erlbeck1-0/+4
Incoming DTAP messages from MS are discarded during silent calls, which leads to the repeated delivery of SMS since the ACKs are not being processed. This patch adds some log messages that have been helpful to track this down. Sponsored-by: On-Waves ehf
2013-07-27expiration: Speculative fixes for the periodic expiring handlingHolger Hans Peter Freyther1-1/+10
We were expiring subscribers during active calls. This is because the T3212 is stopped under certain conditions but we didn't stop that timer at all. Remember if T3212 timer was stopped due something done by NITB and update the expiration time at the end of the radio connection, as the phone should restart it when returning to MM Idle. It is a bit difficult to decide when we should set the flag. E.g. in a CM Service Request we don't know if we accept the service and during a LU we already send MM messages before we accept or reject the subscriber. The easiest is to set the flag when receiving a paging response on known subscribers and at the end of the authentication process. Do not expire a subscriber that has an active connection that is marked with the flag, e.g. we would still expire a subscriber that is being paged. Manual tests executed/passed: * gst LUTest.st verified that a expiration date was set * gst SMSTest.st (doing another LU but forcing a timeout on the SMS sending). Verified that the expire_lu was updated.
2013-07-27misc: Fix compilation warningsHolger Hans Peter Freyther1-2/+0
bsc_api.c:417:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘unsigned int’ [-Wformat] bsc_api.c: In function ‘handle_ass_fail’: bsc_api.c:458:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘unsigned int’ [-Wformat] db.c: In function ‘db_sync_subscriber’: db.c:785:3: warning: format ‘%i’ expects argument of type ‘int’, but argument 8 has type ‘time_t’ [-Wformat] osmo_msc.c: In function ‘msc_release_connection’: osmo_msc.c:145:20: warning: unused variable ‘trans’ [-Wunused-variable] smpp_smsc.c: In function ‘link_accept_cb’: smpp_smsc.c:891:24: warning: assignment from incompatible pointer type [enabled by default] smpp_smsc.c:271:1: warning: ‘esme_by_system_id’ defined but not used [-Wunused-function] smpp_openbsc.c: In function ‘smpp_openbsc_init’: smpp_openbsc.c:545:2: warning: implicit declaration of function ‘smpp_vty_init’ [-Wimplicit-function-declaration] osmo_bsc_ctrl.c: In function ‘verify_bts_loc’: osmo_bsc_ctrl.c:340:19: warning: variable ‘height’ set but not used [-Wunused-but-set-variable smpp_mirror.c: In function ‘main’: smpp_mirror.c:297:2: warning: implicit declaration of function ‘osmo_init_logging’ [-Wimplicit-function-declaration]
2012-12-26libmsc: One of assign_compl and assign_fail will always be calledHolger Hans Peter Freyther1-12/+0
Remove the log messages and comments as they are wrong for now. Even for the mode modify we will get the assign complete call.
2012-12-01nitb: Release the channel if there is nothing on itHolger Hans Peter Freyther1-5/+9
This is more a work around and one still needs to implement a proper dispatch on the opening of the connection. If there is no operation left, no transaction and no silent call, close down the channel.
2012-09-11misc: Address compiler warning on unused variablesHolger Hans Peter Freyther1-2/+1
abis_nm.c: In function ‘abis_nm_get_attr’: abis_nm.c:1380:11: warning: unused variable ‘cur’ [-Wunused-variable] abis_nm.c: In function ‘ipac_parse_bcch_info’: abis_nm.c:2588:11: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] bts_nokia_site.c:1310:6: warning: variable ‘constructed’ set but not used [-Wunused-but-set-variable] bts_nokia_site.c: At top level: bts_nokia_site.c:1364:12: warning: ‘dump_elements’ defined but not used [-Wunused-function] gsm_04_08.c: In function ‘mm_rx_loc_upd_req’: gsm_04_08.c:521:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] osmo_msc.c: In function ‘msc_ciph_m_compl’: osmo_msc.c:122:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] bts_hsl_femtocell.c: In function ‘hslfemto_bootstrap_om’: bts_hsl_femtocell.c:101:11: warning: variable ‘cur’ set but not used [-Wunused-but-set-variable] bts_hsl_femtocell.c: In function ‘hsl_drop_oml’: bts_hsl_femtocell.c:232:21: warning: variable ‘line’ set but not used [-Wunused-but-set-variable] handover_logic.c: In function ‘ho_chan_activ_ack’: handover_logic.c:197:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
2012-01-23Move the bulk of RR processing from MSC into BSCHarald Welte1-0/+29
RR Messages like STATUS, GPRS SUSPEND, HANDOVER COMPLETE/FAIL, ... should be processed on the BSC side of things, not on the MSC side. This is among other things required in preparation of intra-BSC hand-over support in osmo-bsc.
2012-01-23Move processing of CLASSMARK CHANGE behind bsc_apiHarald Welte1-0/+21
This prevents osmo-bsc from sending RR messages to the MSC and rather process them inside the BSC and turn them into BSSAP CM UPDATE.
2011-12-27bsc: Assume assignment_complete/assignment_fail is setHolger Hans Peter Freyther1-1/+26
The osmo-nitb application sometimes crashes because the BSC API is doing an assignment underneath which is not handled by the code, add dumy handlers to not crash, the right thing to do is to change MNCC to have an assignment that can succeed/fail. The keyword to look for is MNCC_LCHAN_MODIFY and mncc_sock should wait for an ack/nack but right now the call just continues.
2011-03-04prefix sub-directories containing libraries with 'lib'Harald Welte1-0/+104
... and make sure tests work again after restructuring