From cd1df9975c68ca4dcf227d8206b95b4fc782b5f4 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Tue, 24 Mar 2020 13:37:17 +0100 Subject: abis_nm: move fail report parsing to extra func Separate raw input parsing from handling the failure report. A follow-up patch will use the new parsing function to print saved failure reports to the VTY. While at it, put struct tlv_parsed inside struct nm_fail_rep_signal_data instead of a pointer, so we don't need an additional alloc. Also add error handling to the abis_nm_tlv_parse() call. Related: OS#1605 Change-Id: Ia51004faf620aa4d40435d58c70d758c9d0054d8 --- include/osmocom/bsc/abis_nm.h | 3 +++ include/osmocom/bsc/signal.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/osmocom/bsc/abis_nm.h b/include/osmocom/bsc/abis_nm.h index 45bbe2c02..83bc2f809 100644 --- a/include/osmocom/bsc/abis_nm.h +++ b/include/osmocom/bsc/abis_nm.h @@ -27,6 +27,7 @@ #include #include +#include /* max number of attributes represented as 3GPP TS 52.021 ยง9.4.62 SW Description array */ #define MAX_BTS_ATTR 5 @@ -170,6 +171,8 @@ void abis_nm_queue_send_next(struct gsm_bts *bts); /* for bs11_config. */ int abis_nm_select_newest_sw(const struct abis_nm_sw_desc *sw, const size_t len); +struct nm_fail_rep_signal_data *abis_nm_fail_evt_rep_parse(struct msgb *mb, struct gsm_bts *bts); + /* Helper functions for updating attributes */ int abis_nm_update_max_power_red(struct gsm_bts_trx *trx); diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h index 10200d75e..952e03ce1 100644 --- a/include/osmocom/bsc/signal.h +++ b/include/osmocom/bsc/signal.h @@ -153,7 +153,7 @@ struct nm_fail_rep_signal_data { struct gsm_bts *bts; /* raw data */ struct msgb *msg; - struct tlv_parsed *tp; + struct tlv_parsed tp; /* parsed data */ struct { const char *event_type; -- cgit v1.2.3