aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-03-24 13:37:17 +0100
committerOliver Smith <osmith@sysmocom.de>2020-03-26 14:52:02 +0100
commitcd1df9975c68ca4dcf227d8206b95b4fc782b5f4 (patch)
treec07529a37c5331cb169fb3fbc17249755560fb68 /include
parent33eca64211759ceec3c7dda9375488cd01fb39fa (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/bsc/abis_nm.h3
-rw-r--r--include/osmocom/bsc/signal.h2
2 files changed, 4 insertions, 1 deletions
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 <osmocom/gsm/protocol/gsm_12_21.h>
#include <osmocom/bsc/gsm_data.h>
+#include <osmocom/bsc/signal.h>
/* 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;