aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/bts_ctrl_commands.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-03-15 13:34:34 +0100
committerHarald Welte <laforge@gnumonks.org>2019-03-27 11:10:57 +0000
commit945c09381d033d142d8e851cd7a4de2e407b61ca (patch)
tree2caf7bc0f26fa95182d24deb5fa82ead0aea4089 /src/common/bts_ctrl_commands.c
parenta5a03d6b355437df1d7c5213236b0096b12640af (diff)
oml: use oml_tx_failure_event_rep() instead of signals to SS_FAIL
At some locations in the code a signal to SS_FAIL is dispatched in order to trigger the sending of an OML failure event report in oml.c. This is a bit overcomplicated for the task. Lets use oml_tx_failure_event_rep() to send the failure event reports and lets remove the signal handler for SS_FAIL. Change-Id: Ie4fce1273a19cc14f37ff6fc7582b2945c7e7c47 Related: OS#3843
Diffstat (limited to 'src/common/bts_ctrl_commands.c')
-rw-r--r--src/common/bts_ctrl_commands.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/bts_ctrl_commands.c b/src/common/bts_ctrl_commands.c
index 4efb4ee3..47d8a5db 100644
--- a/src/common/bts_ctrl_commands.c
+++ b/src/common/bts_ctrl_commands.c
@@ -34,6 +34,8 @@
#include <osmo-bts/oml.h>
#include <osmo-bts/bts.h>
+static struct gsm_bts *g_bts;
+
CTRL_CMD_DEFINE(therm_att, "thermal-attenuation");
static int get_therm_att(struct ctrl_cmd *cmd, void *data)
{
@@ -75,7 +77,7 @@ CTRL_CMD_DEFINE_WO_NOVRF(oml_alert, "oml-alert");
static int set_oml_alert(struct ctrl_cmd *cmd, void *data)
{
/* Note: we expect signal dispatch to be synchronous */
- osmo_signal_dispatch(SS_FAIL, OSMO_EVT_EXT_ALARM, cmd->value);
+ oml_tx_failure_event_rep(&g_bts->mo, OSMO_EVT_EXT_ALARM, cmd->value);
cmd->reply = "OK";
@@ -88,6 +90,7 @@ int bts_ctrl_cmds_install(struct gsm_bts *bts)
rc |= ctrl_cmd_install(CTRL_NODE_TRX, &cmd_therm_att);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_oml_alert);
+ g_bts = bts;
return rc;
}