aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libcommon
AgeCommit message (Collapse)AuthorFilesLines
2017-06-28wip: vty: make msc sccp addressesconfigurablePhilipp Maier1-7/+15
Currently all sccp addresses on the msc (and bsc) side are hardcoded. Prepare the msc code to make the associated BSCs configurble. Make the compiler link libosmo-sccp properly and start using the sccp addressbook feature of libosmoc-sccp. Change-Id: I0171da40cfc2d90a4ca8e423b51cf7275c3d5571
2017-06-18WIP: Integrate AoIP into OsmoBSCPhilipp Maier1-0/+6
2017-06-18temporary dev: set debug log level almost everywhereNeels Hofmeyr1-17/+17
Change-Id: I0d5a36560e7edde27497de57e579f5b1d00eb525
2017-06-18Implement IuCS (large refactoring and addition)Neels Hofmeyr2-0/+12
osmo-nitb becomes osmo-msc add DIUCS debug log constant add iucs.[hc] add msc vty, remove nitb vty add libiudummy, to avoid linking Iu deps in tests Use new msc_tx_dtap() instead of gsm0808_submit_dtap() libmgcp: add mgcpgw client API bridge calls via mgcpgw mgcp: hack RAB success from nano3G: patch first RTP payload The ip.access nano3G needs the first RTP payload's first two bytes to read hex 'e400', or it will reject the RAB assignment. Add flag patched_first_rtp_payload to mgcp_rtp_state to detect the first RTP payload on a stream, and overwrite its first bytes with e400. This should probably be configurable, but seems to not harm other femto cells (as long as we patch only the first RTP payload in each stream). Only do this when sending to the BTS side. Change-Id: Ie13ff348117e892d41b8355ab6c24915301eaeaf
2017-06-18mscsplit: various preparations to separate MSC from BSCNeels Hofmeyr1-33/+1
Disable large parts of the code that depend on BSC presence. Don't set msg->lchan nor msg->dst. Don't use lchan in libmsc. Decouple lac from bts. Prepare entry/exit point for MSC -> BSC and MSC -> RNC communication: Add msc_ifaces.[hc], a_iface.c, with a general msc_tx_dtap() to redirect to different interfaces depending on the actual subscriber connection. While iu_tx() is going to be functional fairly soon, the a_tx() is going to be just a dummy for some time (see comment). Add Iu specific fields in gsm_subscriber_connection: the UE connection pointer and an indicator for the Integrity Protection status on Iu (to be fully implemented in later commits). Add lac member to gsm_subscriber_connection, to allow decoupling from bts->location_area_code. The conn->lac will actually be set in iu.c in an upcoming commit ("add iucs.[hc]"). move to libcommon-cs: gsm48_extract_mi(), gsm48_paging_extract_mi(). libmsc: duplicate gsm0808 / gsm48 functions (towards BSC). In osmo-nitb, libmsc would directly call the functions on the BSC level, not always via the bsc_api. When separating libmsc from libbsc, some functions are missing from the linkage. Hence duplicate these functions to libmsc, add an msc_ prefix for clarity, also add a _tx to gsm0808_cipher_mode(): * add msc_gsm0808_tx_cipher_mode() (dummy/stub) * add msc_gsm48_tx_mm_serv_ack() * add msc_gsm48_tx_mm_serv_rej() Call these from libmsc instead of * gsm0808_cipher_mode() * gsm48_tx_mm_serv_ack() * gsm48_tx_mm_serv_rej() Also add a comment related to msc_gsm0808_tx_cipher_mode() in two places. Temporarily disable all paging to be able to link libmsc without libbsc. Skip the paging part of channel_test because the paging is now disabled. In osmo-nitb, paging is done on BSC level and MSC level "at the same time". When the new MSC is fully operational, paging will be controlled separately on the MSC level, and the BSC (RNC) level will be instructed over an IuCS or A-interface to negotiate paging with the MS (UE). This MSC level paging does not yet exist and will be added in subsequent commits. msc_compl_l3(): publish in .h, tweak return value. 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 add gsm_encr to subscr_conn move subscr_request to gsm_subscriber.h subscr_request_channel() -> subscr_request_conn() move to libmsc: osmo_stats_vty_add_cmds() gsm_04_08: remove apply_codec_restrictions() gsm0408_test: use NULL for root ctx move to libbsc: gsm_bts_neighbor() move to libbsc: lchan_next_meas_rep() move vty config for t3212 to network level (periodic lu) remove unneccessary linking from some tests remove handle_abisip_signal() abis_rsl.c: don't use libvlr from libbsc Change-Id: I9cf80f9c2c8a53a29e42f000029e680a9922cb41
2017-06-18Use libvlr in libmsc (large refactoring)Harald Welte4-143/+44
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-06-18gsup_client: allow passing a unit id to identify with HLRNeels Hofmeyr2-5/+15
Before, each GSUP client would contact the HLR with an identical unit id, i.e. "SGSN-00-00-00-00-00-00", with the result that some messages were sucked off by the wrong client. Pass explicit unit name from each gsup client user, so that OsmoMSC is "MSC" and OsmoSGSN is "SGSN". Hence the HLR can properly route the messages. Todo: also set some values instead of the zeros. Unrelated cosmetic change while editing the arguments: gsup_client_create()'s definition's oap client config arg name mismatched the one used in the declaration. Use oapc_config in both. Change-Id: I3f8d6dd47c7013920e2a4bde006ed77afd974e80
2017-06-18Add vty command "radio-link-timeout infinite" for uplink rx testingHarald Welte1-2/+38
When we are performing Rx sensitivity testing on a BTS, we want to deactivate the connection failure criterion / radio link timeout, i.e. no matter how many SACCH frames in uplink are failed to decode, the BTS should never close the channel. OsmoBTS Change-Id I736f21f6528db5c16fa80cdb905af20673797be5 covers a way how this behavior can be requested from the BTS via an OML attribute. This patch adds support to the BSC to actually set that attribute. Do not use this in production networks, as the BTS will keep open radio channels indefinitely even if the phone is gone and no longer transmitting anything. This is a pure testing feature. Change-Id: I6cb94e0f024934f7baeeb728ca9ed3042fbf16d2
2017-06-09Get TRX attributesMax1-0/+1
Request per-TRX attributes in addition to BTS attributes. Change-Id: I2b61131b9930afd03357c0b66947ee856d58cc46 Related: OS#1614
2017-06-09don't re-implement osmo_talloc_replace_string()Harald Welte1-8/+0
osmo_talloc_replace_string() was introducd into libosmocore in 2014, see commit f3c7e85d05f7b2b7bf093162b776f71b2bc6420d There's no reason for us to re-implement this as bsc_replace_string here. Change-Id: I6d2fcaabbc74730f6f491a2b2d5c784ccafc6602
2017-05-31Add remote BTS feature storage and helpersMax2-0/+17
In addition to compile-time defined BTS model features we also need run-time BTS features reported by BTS via OML. This should be shared by BSC and BTS. To accommodate for this, add following: * features bitvec to gsm_bts struct * features descriptions * comments to avoid confusion between 2 feature sets * helper functions to set/query particular feature * upper boundary on number of supported features and assertion for it Change-Id: I02bd317097ba66585c50ebd4e8fc348f6dc3dad9 Related: OS#1614
2017-05-31Adjust BTS model feature checkMax1-6/+6
Rename gsm_bts_has_feature() -> gsm_btsmodel_has_feature() and adjust type signature to match gsm_btsmodel_set_feature() function and avoid confusion with upcoming functions to check/set BTS features reported over OML. Change-Id: I97abdedbef568e0c2fbd37c110f7d658cf20e100 Related: OS#1614
2017-05-25pcu_sock: add basic pcu interface supportPhilipp Maier1-0/+5
Adds a basic version of a pcu socket interface, similar to the one that can be found in osmo-bts. Change-Id: Ib13cb4099d12fa71e9e0b8727e19ab29e11909b2
2017-05-25gsm_data_shared: add value strings for gsm_chreqPhilipp Maier1-0/+10
Change-Id: I23d3be5610a5a46098d2b12feed4245828599aae
2017-05-10src: use osmo_timer_setup()Pablo Neira Ayuso2-6/+3
Use new function available in libosmocore to set up timers. Compile tested only. Change-Id: Ibcfd915688e97d370a888888a83a7c95cbe16819
2017-05-09Make BTS type and variant converters shareableMax2-20/+55
* move value_string definition and corresponding functions for BTS type to shared header to make it re-usable by OsmoBTS * use consistent function naming * add similar functions for BTS variant * add enum to be used by OML Attribute Reporting to distinguish between type, variant and other info Change-Id: Ida94725a6fce968443541e3526f48f13758031fd Related: OS#1614
2017-04-10gsm_bts: add version and variant detailsMax1-3/+3
* add version string to gsm_bts * add PCU version string to gsm_bts * rename GSM_BTS_TYPE_OSMO_SYSMO -> GSM_BTS_OSMOBTS to avoid confusion between BTS model and variant * add variant enum to gsm_bts_model using enum with variants for each hw vendor of OsmoBTS * show connected PCU version (if available) in vty via 'show bts' This will come in handy when logging details regarding particular BTS reported via OML, see: Related: OS#1614 Change-Id: I6710d53115f34634a7b70969cc05fd5c72ff8ab2
2017-03-15oap tests: fix after SQN scheme changes from libosmocoreNeels Hofmeyr1-1/+1
In change-id Iadf43f21e0605e9e85f7e8026c40985f7ceff1a3, libosmocore changes from incrementing SQN after tuple generation to incrementing SQN before tuple generation. Thus we now need to pass desired_sqn - 1 to get the same tuples. Change-Id: Ifeda71e713bb60dcd31ac651f461b714cfa39b5c Related: OS#1968 OS#1969
2017-03-08add struct bsc_subscr, separating libbsc from gsm_subscriberNeels Hofmeyr1-3/+9
In a future commit, gsm_subscriber will be replaced by vlr_subscr, and it will not make sense to use vlr_subscr in libbsc. Thus we need a dedicated BSC subscriber: struct bsc_subscr. Add rf_policy arg to bsc_grace_paging_request() because the bsc_subscr will no longer have a backpointer to gsm_network (used to be via subscr->group). Create a separate logging filter for the new BSC subscriber. The implementation of adjusting the filter context is added in libbsc to not introduce bsc_subscr_get/_put() dependencies to libcommon. During Paging Response, fetch a bsc_subscr from the mobile identity, like we do for the gsm_subscriber. It looks like a duplication now, but will make sense for the VLR as well as for future MSC split patches. Naming: it was requested to not name the new struct bsc_sub, because 'sub' is too ambiguous. At the same time it would be fine to have 'bsc_sub_' as function prefix. Instead of struct bsc_subscriber and bsc_sub_ prefix, I decided to match both up as struct bsc_subscr and bsc_subscr_ function prefix. It's fast to type, relatively short, unambiguous, and the naming is consistent. Add bsc_subscr unit test. Related: OS#1592, OS#1594 Change-Id: Ia61cc00e8bb186b976939a4fc8f7cf9ce6aa3d8e
2017-02-24cosmetic: rename osmo_msc_data.h to bsc_msc_data.hNeels Hofmeyr1-1/+1
With the OsmoMSC program coming up, the name osmo_msc_data becomes even more confusing than it already is. Clearly indicate it as libbsc's data of a remote MSC by prefixing with bsc_. Also, the Osmocom community has in the meantime agreed to have the osmo_ prefix only in libosmocore, to avoid naming conflicts in case things are moved there. So while renaming anyway, also drop the osmo_ prefix. Change-Id: I13554563ce9289de126ba0d4cf329bafcda35607
2017-02-23logging fixup: shorter names for LOGGING_FILTER_* and LOGGING_CTX_*Neels Hofmeyr1-12/+12
In libosmocore, my patch was merged to master a bit too soon. To accomodate the request for naming that matches the general "LOG" prefix instead of "LOGGING", a fixup was committed to libosmocore. Adjust for that. Original patch: change-id I5c343630020f4b108099696fd96c2111614c8067 The fixup: change-id I424fe3f12ea620338902b2bb8230544bde3f1a93 Change-Id: Ib2ec5e4884aa90f48051ee2f832af557aa525991
2017-02-22debug.h/c: remove unused cruft / cosmetic tweaksNeels Hofmeyr1-2/+1
Change-Id: I9601d478763569933bcc46bf4eaaff70a9843be9
2017-02-22logging: use central filter and ctx consts from libosmocoreNeels Hofmeyr1-24/+18
The LCHAN and BTS filter contexts are actually never used, so drop them until someone adds them properly. For now use only LOGGING_{FILTER,CTX}_VLR_SUBSCR. Some of these will change to _BSC_SUBSCR once struct bsc_subscriber is introduced, and later on, struct gsm_subscriber will be replaced by vlr_subscriber so that the names will match. Depends: libosmocore change-id I5c343630020f4b108099696fd96c2111614c8067 Change-Id: Ifa82f6a461ad4c0eeddb8a38fb3833460432d16b
2017-01-23cosmetic: use osmo_strlcpy() everywhereNeels Hofmeyr2-3/+3
Shorten some code and make obvious to the reader that the string copy is done in a safe way. Change-Id: I900726cf06d34128db22a3d3d911ee0d1423b1bd
2017-01-23fix strncpy() invocation in vty_interface_layer3.c and 3 testsNeels Hofmeyr1-3/+4
Use osmo_strlcpy() to fix unsafe invocation of strncpy(), which potentially left the result unterminated. Change-Id: I1a119b1760a3e3262538b4b012d476fdce505482
2016-12-13oap_client: make use of OAP optional: disable for NULL configNeels Hofmeyr2-2/+6
When passing a NULL config to osmo_oap_client_init(), set OAP to disabled state. Along with the previous fix that ensures message rejection in the disabled state, this makes use of OAP in the GSUP client optional. oap_client_test: expect null config to set state to disabled. Related: OS#1592 Change-Id: Ie4d622fcfd24cb7d89d19f93e4b2571d8fadd1a3
2016-12-13oap_client: reject all messages in disabled/uninitialized stateNeels Hofmeyr2-0/+17
Fixes the bug indicated in oap_client_test.c: adjust to actually expect the proper behavior. Also adjust for modified return value for message rejection. Instead of -1, just expect < 0. Adjust experr for new error messages. Related: OS#1592 Change-Id: I16165d228653e8a2689f9df94b77b470c06480c6
2016-12-13oap_client: move logging to DLOAP logging categoryNeels Hofmeyr1-12/+12
Use libosmocore's DLOAP logging category for OAP. oap_client_test.c: make sure DLOAP is in DEBUG level to not lose any logging messages from experr. Todo: we're using a "Library" logging category, which is not really what the library category was intended for. Instead, the OAP client should probably be given a logging category like DVLR or DGPRS in its initialization API. Related: OS#1592 Change-Id: Ic765c19381b0d983da90a5d8aee9cd17e31cf34a
2016-12-13move grps_gsup_client.c to libcommon/gsup_client.cNeels Hofmeyr3-0/+657
This is in preparation for libvlr. Related: OS#1592 Change-Id: I9ad7dc7f17f3b033c779de9ae8bc120655502fce
2016-12-13move gprs/oap.c to libcommon/oap_client.cNeels Hofmeyr2-0/+262
This is in preparation for libvlr. Related: OS#1592 Change-Id: Ib526df6d9de55a1e59a379d5e2c8541ed0ef67e3
2016-12-09lchan release in error state: SACCH deact only for SACCH pchansNeels Hofmeyr1-1/+1
This is useful particularly in case where we deactivate PDCHs which don't have a SACCH associated. The existin code would always attempt to deactivate a SACCH even in those cases, leading to the BTS responsding with related error messages. Change-Id: Iaf46782329b38ba8f3d438e6c75c2d467b852734
2016-11-13Support configuration of CON MO Groups/Paths from VTYHarald Welte1-0/+10
The code for supporting the configuration of the OM2000 CON (LAPD Concentrator) MO was so far incomplete and not used from the OM2000 FSM initialization. This patch adds * VTY commands for configuration of CON Groups and Paths * The FSM integration to actually configure the CON MO Change-Id: I56dc1b5e35adef3a2078bcf9536537eb0f454192
2016-11-11talloc_cxt: Fix compiler warning / missing #includeHarald Welte1-0/+1
talloc_ctx.c: In function ‘talloc_ctx_init’: talloc_ctx.c:40:2: warning: implicit declaration of function ‘msgb_talloc_ctx_init’ [-Wimplicit-function-declaration] msgb_talloc_ctx_init(ctx_root, 0); ^~~~~~~~~~~~~~~~~~~~ Change-Id: Ib8ebc02d5cf0d2b4019473d3750ae7c6f8a32896
2016-10-18Replace magic number with defineMax1-1/+1
Value 4 used as magic number by both OpenBSC and OsmoBTS so it make sense to add it to shared header. See ebb483b69a5319e522ba5f713e9cb6f68a814a6a in osmo-bts for details. Change-Id: I9c6ad68f4c6aa72d39ec7e5a6968b36ec20e79f4
2016-10-13msgb ctx: use new msgb_talloc_ctx_init(), don't access talloc_msgb_ctxNeels Hofmeyr1-2/+1
Drop extern definitions of talloc_msgb_ctx and use msgb_talloc_ctx_init() instead. In sgsn_test.c, use a local variable msgb_ctx to do the talloc report from the return value of msgb_talloc_ctx_init(). Change-Id: I2f9ace855f0ecbdc9adf5d75bcb1a3d666570de4
2016-10-10gsm_trx_name(): don't break if trx is NULLNeels Hofmeyr1-2/+5
Just as a general precaution deemed to fit such a convenience function that lives in libcommon, no actual failure observed. Change-Id: I8e77fe1abc402469fd037e2fde2f46e2c8114f59
2016-09-28dyn TS: fix: e1_config.c: switch(pchan) for dyn TSNeels Hofmeyr1-0/+16
Add ts_is_tch() in gsm_data_shared.h/.c and use it to replace a switch on the pchan in e1_config.c. This patch is not due to an actual observed failure. A general grep for switch on pchan turned up this instance that doesn't handle dyn TS properly. Hence this patch is not actually tested with real equipment. Change-Id: Ide4f156034bab77140d2d9a8c462d68ae6f0d6a6
2016-09-28dyn TS: fix: ts_subslots() for TCH/F_PDCH in PDCH modeNeels Hofmeyr1-6/+20
In gsm_data_shared.c, add ts_pchan() to determine actual pchan type for dynamic and non-dynamic TS. Use in ts_subslots() to fix the value returned for TCH/F_PDCH in PDCH mode. Adjust the assertion in channel_test.c accordingly. Drop GSM_PCHAN_TCH_F_PDCH, which is now handled in ts_pchan(). Explicitly add GSM_PCHAN_PDCH as zero in subslots_per_pchan[] (cosmetic). Adjust the comment in subslots_per_pchan[]. The fix for the number of subslots affects only one caller: bts_chan_load() in chan_alloc.c. Before this, it would always include a TCH/F_PDCH in the load_counter->total, now it is skipped when in PDCH mode. Whether this is the way bts_chan_load() should handle dynamic TS is a separate discussion, so far I'm only making sure that the two dyn TS kinds act in the same way: TCH/F_TCH/H_PDCH is only counted when in TCH mode, and TCH/F_PDCH should match. Change-Id: Icd6668667ad2be7ad20866ffd185bf3b8711ccd6
2016-09-26mscsplit: talloc_ctx_init(): decouple from global tall_bsc_ctxNeels Hofmeyr1-17/+16
Decouple the talloc context allocations from global tall_bsc_ctx pointer. It appears that talloc_ctx_init() was intended for general use, since it is located in libcommon. It is currently used only by osmo-nitb; but the upcoming osmo-cscn will use it as well. Instead of defining in osmo-nitb main file, add definition in gsm_data.h. Change-Id: I168106599b788f586be0ff0af4699b9746c1b103
2016-09-22cosmetic fixes in libcommon/talloc_ctx.cNeels Hofmeyr1-1/+20
Add copyright notice, remove obsolete include, remove unneeded line break. Change-Id: I4d06a0323aee5a003b06edd179fc61e1936acae5
2016-09-17Modify SI 13 field for control_ack_typeMax1-0/+1
Add vty function to explicitly set use of 4xRACH type of ack message for PACKET CONTROL ACKNOWLEDGMENT. Previous hardcoded value (use RLC/MAC control block) is used as a default. This is handy for debugging issues related to Timing Advance in context of GPRS. Change-Id: Ie869ac0a82055110f1e3b875e246750c4e113336 Related: OS#1526
2016-09-15Consistenly format variables in */Makefile.am filesAlexander Huemer1-7/+27
Change-Id: Ifa21513c007072314097b7bec188579972dc1694
2016-08-27move ts_sublots() to gsm_data_shared.c, it will be used by osmo-btsNeels Hofmeyr1-0/+25
Change-Id: I8ba06d7dd6e0ceab3d8d18bb565354d6ed461f7e
2016-08-10gsm_pchan2chan_nr(): fix uninitialized cbitsNeels Hofmeyr1-6/+5
Commit ec1b5a0e9e2b6549e0ede48e803095e569997355 introduced an unset cbits value for the 'special hack for BCCH', where I break out of the switch without setting cbits. Fix that. Also remove the comment part that says 'return 0', because I don't return 0. Change-Id: I54129d921807971eeafc23f80c57666c67b71377
2016-08-10gsm_pchan2chan_nr: disable a chan_nr assert in BTS, to not break octphyNeels Hofmeyr1-0/+10
In https://gerrit.osmocom.org/589 , msuraev reports an assertion on octphy. So disable this recently added assertion until we clarify the invocation in question. Change-Id: Ia0f7ae5b114e179ab56b98adbae9810e81b4b88f
2016-07-28dyn TS: rsl_lchan_lookup(): add dyn PCHANNeels Hofmeyr1-2/+12
Accept GSM_PCHAN_TCH_F_TCH_H_PDCH for TCH/F and TCH/H if in matching pchan mode or switching to matching pchan. Accept RSL_CHAN_OSMO_PDCH chan_nr cbits for GSM_PCHAN_TCH_F_TCH_H_PDCH pchan. Change-Id: If8f7c118f69e5a9f370bfe25f82f3d5a8de75b51
2016-07-28dyn TS: rsl *2chan_nr(): handle TCH/F_TCH/H_PDCHNeels Hofmeyr1-0/+7
In gsm_lchan2chan_nr() use the current pchan type. In gsm_lchan_as_pchan2chan_nr(), add the special case of non-standard cbits for activating PDCH on a TCH/F_TCH/H_PDCH dyn TS. This way, gsm_pchan2chan_nr() conforms to the standard and does not need access to a ts struct. Change-Id: If248b9073b9f397110a2003d8e1a04afdc1c0e20
2016-07-28dyn TS: gsm_lchan2chan_nr(): decouple from ts->pchanNeels Hofmeyr1-4/+11
For upcoming dynamic TS, the pchan choice for RSL De-/Activation is not trivial. So in order to pass the desired pchan to generate the RSL chan_nr, introduce gsm_lchan_as_pchan2chan_nr(). To avoid code dup, this requires decoupling the gsm_ts2chan_nr() pchan from the actual ts struct, so refactor gsm_ts2chan_nr() to gsm_pchan2chan_nr() with explicit pchan, ts_nr and lchan_nr arguments. Change-Id: I1a40e8452fe8120d350a27973e56be0b8c8c517f
2016-07-28gsm_ts2chan_nr(): add assertions for lchan_nrNeels Hofmeyr1-0/+14
Change-Id: Ibfdef347c85d4a145645a7325cd193ea1b475a54
2016-07-25code dup: join [rsl_]lchan_lookup() from libbsc and osmo-btsNeels Hofmeyr1-0/+49
lchan_lookup in abis_rsl.c and rsl_lchan_lookup() from osmo-bts rsl.c are the same code, except for the log context, which is only set in abis_rsl.c. Factor out the common code to rsl_lchan_lookup() in gsm_data_shared.c. Openbsc and osmo-bts each define their own DRSL log constant, so add an int *rc return code argument and keep the logging part in abis_rsl.c's thin lchan_lookup() wrapper. Incidentally, this also removes code dup for logging. To avoid duplicate symbols, the rsl_lchan_lookup() implementation needs to be removed from osmo-bts, so older osmo-bts git revisions will not build with this. Change-Id: Ie89bc5bb9110a0e539d37991dedac6f913211b48