aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-05-25 09:39:53 +0200
committerlaforge <laforge@osmocom.org>2020-01-06 10:28:18 +0000
commit35d07b76987fadc4f90e314089f0c66606c5a3eb (patch)
tree5dfb03c1d47c07b1a05035288f64333d2e3b04ca /src
parenta1362ce8c20b2fa60e3da67936ea69d406e23aff (diff)
Introduce nm_fail_rep_signal_data for "SS_NM, S_NM_FAIL_REP" signal
Let's not just pass around the raw msgb, but also all other metadata, such as the decoded parts of the TS 12.21 message. As there's no current consumer of that signal, this creates no compatibility issues. Change-Id: I5d4d9d422b4e23348ffbe69c6e87a31d5574f90d
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bsc/abis_nm.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index 7ca4e7983..a874b53ee 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -358,6 +358,7 @@ static int rx_fail_evt_rep(struct msgb *mb, struct gsm_bts *bts)
struct abis_om_hdr *oh = msgb_l2(mb);
struct abis_om_fom_hdr *foh = msgb_l3(mb);
struct e1inp_sign_link *sign_link = mb->dst;
+ struct nm_fail_rep_signal_data sd;
struct tlv_parsed tp;
int rc = 0;
const uint8_t *p_val = NULL;
@@ -398,6 +399,24 @@ static int rx_fail_evt_rep(struct msgb *mb, struct gsm_bts *bts)
rc = -EINVAL;
}
+ sd.bts = mb->trx->bts;
+ sd.msg = mb;
+ sd.tp = &tp;
+ if (e_type)
+ sd.parsed.event_type = e_type;
+ else
+ sd.parsed.event_type = "<none>";
+ if (severity)
+ sd.parsed.severity = severity;
+ else
+ sd.parsed.severity = "<none>";
+ if (p_text)
+ sd.parsed.additional_text = p_text;
+ else
+ sd.parsed.additional_text = "<none>";
+ sd.parsed.probable_cause = p_val;
+ osmo_signal_dispatch(SS_NM, S_NM_FAIL_REP, &sd);
+
if (p_text)
talloc_free(p_text);
@@ -419,7 +438,6 @@ static int abis_nm_rcvmsg_report(struct msgb *mb, struct gsm_bts *bts)
break;
case NM_MT_FAILURE_EVENT_REP:
rx_fail_evt_rep(mb, bts);
- osmo_signal_dispatch(SS_NM, S_NM_FAIL_REP, mb);
break;
case NM_MT_TEST_REP:
DEBUGPFOH(DNM, foh, "Test Report\n");