aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/handover_logic.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-18Use libvlr in libmsc (large refactoring)Harald Welte1-1/+2
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. 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
2017-05-10src: use osmo_timer_setup()Pablo Neira Ayuso1-2/+1
Use new function available in libosmocore to set up timers. Compile tested only. Change-Id: Ibcfd915688e97d370a888888a83a7c95cbe16819
2016-08-29libmsc/bsc: split rate counters into bsc and msc groupAlexander Couzens1-5/+5
Tweaked-By: Neels Hofmeyr <nhofmeyr@sysmocom.de> Change-Id: I7361033cd1eb919ec3c2ea2652f40ab8c75b2f99
2016-08-27libbsc/libmsc: convert old osmo counter into rate_ctrgsAlexander Couzens1-5/+5
rate counters support the export to statsd and can have a delta value. Change-Id: Ie749cebd53a0bb618d0e23d375885712078bf8dd
2016-07-09libbsc: skip channel state LCHAN_S_INACTIVE while handoverAlexander Couzens1-1/+0
The state is directly overwritten by the next function. Because there isn't any state transition, remove this state. Change-Id: I7f287692dbd559268fb5e61d81ac19e5dd4827eb
2016-06-05comment tweak for bsc_handover_start()Neels Hofmeyr1-3/+3
Have a comment only in the .c file to remove dup, tweak wording, use doxygen style. Change-Id: If054dad877a1ca750cd72be9c9d90bcf087bf741
2015-09-22Add full AMR multirate IE support with VTY config for MS and BTS sideAndreas Eversberg1-1/+2
2014-12-18ho: Copy the multirate config to the new lchanHolger Hans Peter Freyther1-0/+1
The new lchan will be in speech mode already but for AMR we will need to provide a working multirate config in the channel activation, otherwise the channel act might be nacked. Copy the config from the current lchan into the new lchan. The abis code simply added the mrconf if the speech mode was amr. Before this commit the invalidate mrconf with all zeroes was copied/sent.
2014-12-17ho: Make sure the timer is always stoppedHolger Hans Peter Freyther1-14/+16
In case of a ho_chan_activ_nack (sent due another bug inside both sysmobts and openbsc) the code would not stop the timer but free the datastructure. This can lead to a clear segfault when the timer has expired. Create a "free" function which is responsible to detach the handover structure, stop the timer (which is idempotent) and free the structure.
2014-08-04dyn PDCH: Cleanup of rsl_chan_activate_lchan() and usersAndreas Eversberg1-2/+1
Timing advance is stored inside lchan structure, so it is removed from arguments. This is useful, if other actions are required prior calling rsl_chan_activate_lchan. (like deactivating PDCH first) The "shifted TA value" that is required by BS11 is now calculated inside rsl_chan_activate_lchan and not by each user. [Rebased by Holger. So some hunks were skipped as the patch depended on Jolly's HO code]
2014-01-27Add function to update TRAU muxer after assignment or handoverAndreas Eversberg1-2/+5
E1 based BTS use TRAU muxer to decode TRAU frames. After changing channel from one timeslot to another (due to handover or assignment), the TRAU muxer must be updated. The call reference of the call is disconnected from the old channel and connected to the new channel.
2012-12-26handover: Fix the handover signalling for IP based BTSesHolger Hans Peter Freyther1-26/+9
This was reported by Kevin when he was testing handover. The problem is the order of the signal handlers for S_ABISIP_CRCX_ACK. Right now the handover signal handler is called before the one inside the libmsc gsm_04_08.c. This means S_HANDOVER_ACK is signalled _before_ there is a rtp socket created for the channel. The result is that the MDCX will never be sent and the called will not be properly switched _after_ the handover detection. I do not want to play with the order of signal handlers, remove the CRCX ack handling from the handover_logic.c and force the NITB (and later the BSC) to check if the lchan is involved with a handover and do the switching in there. This means right now we do what two signal handlers did in one. Reproduced and tested with the FakeBTS Handover test. Log message: <0004> abis_rsl.c:1954 (bts=1,trx=0,ts=3,ss=0) IPAC_CRCX_ACK ... <000c> gsm_04_08.c:1400 no RTP socket for new_lchan <001a> rtp_proxy.c:533 rtp_socket_create(): success <001a> rtp_proxy.c:615 rtp_socket_bind(rs=0x48703c8, IP=0.0.0.0): ...
2012-12-23rsl: Call the release function with the enum name and not the numberHolger Hans Peter Freyther1-4/+4
Done with the semantic patch: @rule1@ expression E; expression F; @@ - lchan_release(E, F, 1); + lchan_release(E, F, RSL_REL_LOCAL_END); @rule2@ expression E; expression F; @@ - lchan_release(E, F, 0); + lchan_release(E, F, RSL_REL_NORMAL);
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-07-12handover: Not finding a HO record on CHAN ACT NACK is not an errorHarald Welte1-1/+1
... it might well a completely non-ho-related establishment
2012-01-17ho: Remove rtp_proxy.h include, no proxy code in hereHolger Hans Peter Freyther1-1/+0
2011-05-06src: use namespace prefix osmo_counter*Pablo Neira Ayuso1-5/+5
Summary of changes: s/struct counter/struct osmo_counter/g s/counter_inc/osmo_counter_inc/g s/counter_get/osmo_counter_get/g s/counter_reset/osmo_counter_reset/g s/counter_alloc/osmo_counter_alloc/g s/counter_free/osmo_counter_free
2011-05-06src: use namespace prefix osmo_signal*Pablo Neira Ayuso1-3/+3
Summary of changes: s/signal_cbfn/osmo_signal_cbfn/g s/register_signal_handler/osmo_signal_register_handler/g s/unregister_signal_handler/osmo_signal_unregister_handler/g s/dispatch_signal/osmo_signal_dispatch/g
2011-05-06src: use namespace prefix osmo_timer* for timer functionsPablo Neira Ayuso1-5/+5
Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
2011-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther1-2/+2
This was done with sed on the files.
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-3/+3
libosmogsm is a new library that is distributed in the libosmocore. Now, openbsc depends on it. This patch gets openbsc with this change. This patch also rewrites all include path to the new osmocom/[gsm|core] Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-04prefix sub-directories containing libraries with 'lib'Harald Welte1-0/+393
... and make sure tests work again after restructuring