aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-03-15 12:08:05 +0100
committerHarald Welte <laforge@gnumonks.org>2019-03-27 11:10:57 +0000
commita5a03d6b355437df1d7c5213236b0096b12640af (patch)
tree1b8c6e87436519ff772cc3c5441cc6aee78d6e06 /src/common
parent891ba1568ad595c92bd885d417e34a78272f664f (diff)
oml: use oml_tx_failure_event_rep() instead of oml_fail_rep()
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
Diffstat (limited to 'src/common')
-rw-r--r--src/common/bts.c11
-rw-r--r--src/common/l1sap.c6
-rw-r--r--src/common/main.c5
-rw-r--r--src/common/oml.c15
-rw-r--r--src/common/rsl.c21
5 files changed, 26 insertions, 32 deletions
diff --git a/src/common/bts.c b/src/common/bts.c
index abbaeb46..8c2b2fea 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -309,10 +309,13 @@ int trx_link_estab(struct gsm_bts_trx *trx)
rc = rsl_tx_rf_res(trx);
else
rc = bts_model_trx_deact_rf(trx);
- if (rc < 0)
- oml_fail_rep(OSMO_EVT_MAJ_RSL_FAIL,
- link ? "Failed to establish RSL link (%d)" :
- "Failed to deactivate RF (%d)", rc);
+ if (rc < 0) {
+ oml_tx_failure_event_rep(&trx->bb_transc.mo, OSMO_EVT_MAJ_RSL_FAIL,
+ link ?
+ "Failed to establish RSL link (%d)" :
+ "Failed to deactivate RF (%d)", rc);
+ }
+
return 0;
}
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index a1b04642..f8f3fefb 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1364,8 +1364,10 @@ int l1sap_up(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap)
default:
LOGP(DL1P, LOGL_NOTICE, "unknown prim %d op %d\n",
l1sap->oph.primitive, l1sap->oph.operation);
- oml_fail_rep(OSMO_EVT_MAJ_UKWN_MSG, "unknown prim %d op %d",
- l1sap->oph.primitive, l1sap->oph.operation);
+ oml_tx_failure_event_rep(&trx->mo, OSMO_EVT_MAJ_UKWN_MSG,
+ "unknown prim %d op %d",
+ l1sap->oph.primitive,
+ l1sap->oph.operation);
break;
}
diff --git a/src/common/main.c b/src/common/main.c
index 9575f57c..0d84c183 100644
--- a/src/common/main.c
+++ b/src/common/main.c
@@ -183,8 +183,9 @@ static void signal_handler(int signal)
case SIGINT:
case SIGTERM:
if (!quit) {
- oml_fail_rep(OSMO_EVT_CRIT_PROC_STOP,
- "BTS: SIGINT received -> shutdown");
+ oml_tx_failure_event_rep(&bts->mo,
+ OSMO_EVT_CRIT_PROC_STOP,
+ "BTS: SIGINT received -> shutdown");
bts_shutdown(bts, "SIGINT");
}
quit++;
diff --git a/src/common/oml.c b/src/common/oml.c
index ac388d1b..7ff5967f 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -87,21 +87,6 @@ int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, uint16_t cause_value,
return oml_mo_send_msg(mo, nmsg, NM_MT_FAILURE_EVENT_REP);
}
-void oml_fail_rep(uint16_t cause_value, const char *fmt, ...)
-{
- va_list ap;
- char *rep;
-
- va_start(ap, fmt);
- rep = talloc_asprintf(tall_bts_ctx, fmt, ap);
- va_end(ap);
-
- osmo_signal_dispatch(SS_FAIL, cause_value, rep);
- /* signal dispatch is synchronous so all the signal handlers are
- finished already: we're free to free */
- talloc_free(rep);
-}
-
/* Push OM header in front of msgb and send it */
int oml_send_msg(struct msgb *msg, int is_manuf)
{
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 9334ed9d..f93ca50d 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -466,9 +466,10 @@ static int rsl_rx_paging_cmd(struct gsm_bts_trx *trx, struct msgb *msg)
rc = paging_add_identity(bts->paging_state, paging_group, identity_lv, chan_needed);
if (rc < 0) {
/* FIXME: notfiy the BSC on other errors? */
- if (rc == -ENOSPC)
- oml_fail_rep(OSMO_EVT_MIN_PAG_TAB_FULL,
- "BTS paging table is full");
+ if (rc == -ENOSPC) {
+ oml_tx_failure_event_rep(&trx->bts->mo, OSMO_EVT_MIN_PAG_TAB_FULL,
+ "BTS paging table is full");
+ }
}
pcu_tx_pag_req(identity_lv, chan_needed);
@@ -1938,9 +1939,10 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg)
LOGP(DRTP, LOGL_ERROR,
"%s IPAC Failed to create RTP/RTCP sockets\n",
gsm_lchan_name(lchan));
- oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT,
- "%s IPAC Failed to create RTP/RTCP sockets",
- gsm_lchan_name(lchan));
+ oml_tx_failure_event_rep(&lchan->ts->trx->mo,
+ OSMO_EVT_CRIT_RTP_TOUT,
+ "%s IPAC Failed to create RTP/RTCP sockets",
+ gsm_lchan_name(lchan));
return tx_ipac_XXcx_nack(lchan, RSL_ERR_RES_UNAVAIL,
inc_ip_port, dch->c.msg_type);
}
@@ -1979,9 +1981,10 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg)
LOGP(DRTP, LOGL_ERROR,
"%s IPAC Failed to bind RTP/RTCP sockets\n",
gsm_lchan_name(lchan));
- oml_fail_rep(OSMO_EVT_CRIT_RTP_TOUT,
- "%s IPAC Failed to bind RTP/RTCP sockets",
- gsm_lchan_name(lchan));
+ oml_tx_failure_event_rep(&lchan->ts->trx->mo,
+ OSMO_EVT_CRIT_RTP_TOUT,
+ "%s IPAC Failed to bind RTP/RTCP sockets",
+ gsm_lchan_name(lchan));
osmo_rtp_socket_free(lchan->abis_ip.rtp_socket);
lchan->abis_ip.rtp_socket = NULL;
msgb_queue_flush(&lchan->dl_tch_queue);