aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/main.c
AgeCommit message (Collapse)AuthorFilesLines
2019-08-05Remove undefined param passed to {logging,osmo_stats}_vty_add_cmdsPau Espin Pedrol1-1/+1
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However, definition in C file doesn't contain "(void)", which means number of parameters is undefined and thus compiler doesn't complain. Let's remove parameters from all callers before enforcing "(void)" on it. API osmo_stats_vty_add_cmds never had a param list but has seem problem (no "void"), so some users decided to pass a parameter to it. Change-Id: Ia4d1a7914308d1481fe31fe0986265ead339e61e Related: OS#4138
2019-05-25Add severity to OML FAILURE EVENT REPORTHarald Welte1-1/+1
Example: The fact that the PCU has connected with a given version is not a *failure* in the first place, particularly not a MAJOR one. Let's allow callers of oml_tx_failure_event_rep() specify the serverity of the event that they're reporting to the BSC. Change-Id: I49af04212568892648e0e8704ba1cc6de8c8ae89
2019-03-27oml: use oml_tx_failure_event_rep() instead of oml_fail_rep()Philipp Maier1-2/+3
The function oml_tx_failure_event_rep() replaces oml_fail_rep(), so lets use only oml_tx_failure_event_rep() and remove oml_fail_rep() Change-Id: I83c4fa9ebd519299fd54b37b5d95d6d7c1da24f6 Related: OS#3843
2019-03-27main: remove wrong call to oml_fail_rep() on SIGUSR1/2 and SIGABRTPhilipp Maier1-3/+0
SIGUSR1/2 and SIGABRT should not trigger a failure event report on OML since we only use it to get an intermediate talloc report. (In case of SIGUSR1/2 without leaving the process.) Change-Id: I99e637496afff2530425b89c6e9befc76db24906
2019-02-18Enable statsd supportMax1-0/+2
Change-Id: I9112d9fd527cdc29d89868df40c6845a751c4865
2018-11-18bts: Allocate TRX for BTS dynamically, deprecate -tPau Espin Pedrol1-14/+4
No need to pass -t num_trx anymore to specify number of TRX to use. It is calculated based on dynamic allocation from VTY config. Using parameter -t is flagged as deprecated and is transformed into a NOOP por backward compatibility. As a result, TRX now are allocated after the BTS is allocated and initial config (pre-VTY) is applied. A new function bts_trx_init() is added, to set default config on each TRX during allocation and before setting VTY config on it. A new per BTS model function bts_model_trx_init() is added, to allow per model specific default configuration of each TRX. Change-Id: Iab1a754ab12a626759f9f90aa66f87bdce65ac9c
2018-04-04use osmo_init_logging2() with proper talloc ctxNeels Hofmeyr1-1/+1
Completely drop bts_log_init(), call osmo_init_logging2() directly instead: all callers of bts_log_init() passed NULL as category string, so all it ever did was call osmo_init_logging(). The bts_log_info is already declared in the .h. Here and there also define a proper talloc root context instead of using NULL. Change-Id: Ic049f77bef74123b95350bcae182a468e0086b9c
2018-03-17Get rid of 'struct gsm_bts_role_bts'Harald Welte1-5/+3
gsm_bts_role_bts was introduced at a time when we still shared gsm_data_shared.[ch] between BSC and BTS, and where we then subsequently needed a BTS-private structure. Since that sharing was abandoned quite some time ago, we can merge gsm_bts_role_bts into gsm_bts and do away with the bts/btsb dualism in a lot of the code. Change-Id: I4fdd601ea873d9697f89a748cc77bcf7c978fa3e
2018-03-13common/main.c: track talloc NULL contexts by defaultVadim Yanitskiy1-0/+3
In order to be able to introspect not only the root application context, but also all other contexts, e.g. allocated within libosmocore or other libraries, let's enable tracking the use of NULL contexts using the corresponding talloc API. In order to obserbe all existing contexts, use the following VTY command: OsmoBTS# show talloc-context all ... Example of usage: OsmoBTS# show talloc-context all brief talloc report on 'null_context' (total 1302808 bytes in 5185 blocks) lapd context contains 129 bytes in 5 blocks struct signal_handler contains 40 bytes in 1 blocks struct pcu_sock_state contains 120 bytes in 1 blocks struct lookup_helper contains 24 bytes in 1 blocks struct signal_handler contains 40 bytes in 1 blocks struct signal_handler contains 40 bytes in 1 blocks abis contains 49065 bytes in 19 blocks struct signal_handler contains 40 bytes in 1 blocks struct signal_handler contains 40 bytes in 1 blocks struct signal_handler contains 40 bytes in 1 blocks vty contains 93690 bytes in 5008 blocks logging contains 2862 bytes in 7 blocks OsmoBTS context contains 1156678 bytes in 137 blocks Change-Id: I5e9381902dace7dfd37f98b657e4697b5afcff96
2018-02-24BTS: add rate_ctr about CCCH (paging, agch, pch)Harald Welte1-0/+1
Change-Id: Id6c833746150a3c2e32b00ea6604669f16b84bc4
2018-02-14osmo-bts: Add talloc context introspection via VTYHarald Welte1-0/+1
This requires libosmocore with Change-Id I43fc42880b22294d83c565ae600ac65e4f38b30d or later. Change-Id: Ieed87b8109e0095a3d99c30f0b042aa3ee4b6384
2018-02-08main.c: bts_main: fix typo in error messagePau Espin Pedrol1-1/+1
Change-Id: Ib44fce36a945042e92ea3f4173e72c1ce5f66fb8
2017-08-20Treat SIGTERM just like SIGINT in our programsHarald Welte1-0/+2
When somebody kills the process, it's best to handle the signal and to use the opportunity for some cleanup. We always did this in the BTS on SIGINT, but never on SIGTERM. Let's change it. Change-Id: I10009c08b7178988f646e2b6035197b9640ac9b5
2017-08-14Fix build after recent gsm_bts_alloc() changeHarald Welte1-1/+1
In openbsc.git Change-Id I61c18a7f021fcb1ec00d34a745f4e3ab03416c2d we changed the gsm_bts_alloc() function signature to include a second argument (the BTS number). This broke omso-bts, and this commit is intended to make it build again. Change-Id: I7ef7654d48c1cfc7e4ecb0b771553ec0740ce2bf
2017-01-25OML: internalize failure reportingMax1-8/+5
* make oml_tx_failure_event_rep() static and use osmo_signal_dispatch() wrapped into oml_fail_rep() to trigger event reports outside of oml.c instead of directly calling into OML layer * remove unnecessary formatting from text messages Related: OS#1615 Change-Id: I738555c547926e97b325ab53763c0076c42309bc
2017-01-24build: Do not require more headers from OpenBSCHolger Hans Peter Freyther1-1/+0
There should be no other OpenBSC headers included and nobody is using bsc_controlif_setup. Remove the include. This was introduced in 4723a195081f0f9ff561e360620ee0ade50a2b39. Change-Id: I581f938e8fe9161b1d7076cedd74ff192cea86b2
2017-01-10CTRL: make the CTRL-Interface IP address configurablePhilipp1-1/+6
Currently the IP address where the control interface is bound to is hardcoded to 127.0.0.1. This leads to problems with multiple instances on one and the same machine. This commit integrates the ctrl interface bind option into the VTY, so that we can bind the ctrl interface to any IP address, just like we do it with the VTY already. Change-Id: If51e0c645c0789a4f4a8c51737fb81fb12f80829
2017-01-08Add Abis OML failure event reportingMax1-1/+10
Send 3GPP TS 12.21 ยง 8.8.2 Abis/OML failure event report. Change-Id: Ib1170edca2207752984a554d7a6a57c224f6d5f5 Related: OS#1615
2016-11-09fix 'osmo-bts-* --version' segfaultNeels Hofmeyr1-1/+1
Call vty_init() before handle_options() to make sure the host.app_info is populated before --version potentially tries to print it. Change-Id: Ic87b5498b57b2f0f876171a15e769b74c28348c1
2016-10-14msgb ctx: use new msgb_talloc_ctx_init() in various main()sNeels Hofmeyr1-3/+1
Change-Id: I31d62d5e1f0b272985fdef5013270d385c4b988a
2016-09-22heed VTY 'line vty'/'bind' commandNeels Hofmeyr1-1/+2
Like most other osmo-* programs, bind the telnet VTY to the address specified by the 'line vty'/'bind' command. This is added by vty_init(), so until now the BTS offered this config but ignored it. Change-Id: Ic4ab32aee08d8a779adeb9943892de0c828c7b3d
2016-06-17fix typo in error message ('at lEast')Neels Hofmeyr1-1/+1
Change-Id: I6ac3606157dc6c81ed17cd6d26227da8ae26c49f
2016-02-15make PCU socket and telnet port configurableHarald Welte1-5/+5
In some cases we'd like to run multiple instances of osmo-bts on a single machine. This is the case where we a multi-TRX PHY is to be used for several BTSs, or in case osmo-bts-trx has multple SDRs attached. This wa currently prevented by having a hard-coded PCU socket path and telnet port, which are now configurable via VTY / config file itself.
2016-02-15Introduce new phy_link and phy_instance abstractionHarald Welte1-0/+20
This way we can model a flexible mapping between any number of PHYs, each having multiple instances, and then map BTSs with TRXx on top of those PHYs.
2016-01-23main: Return something from the methodHolger Hans Peter Freyther1-0/+2
Fixes: CID#59923
2016-01-22merge bts-specific main function into common/main.c:bts_main()Harald Welte1-0/+332
This removes a lot of copy+paste duplication between different BTS models.