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
diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h
index 10200d7..952e03c 100644
--- a/include/osmocom/bsc/signal.h
+++ b/include/osmocom/bsc/signal.h
@@ -153,7 +153,7 @@
struct gsm_bts *bts;
/* raw data */
struct msgb *msg;
- struct tlv_parsed *tp;
+ struct tlv_parsed tp;
/* parsed data */
struct {
const char *event_type;