aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorDieter Spaar <spaar@mirider.augusta.de>2011-02-18 11:06:51 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-02-24 14:37:10 +0100
commit6a458eac2c1db16454fe0b4e7b3f68aa961d4004 (patch)
treecfecec556f517e78a696f9aa256361e155e3195b /openbsc
parent6c79a68103b2f95d0ce69294532fbc5d5496cc5c (diff)
oml: Parse probable cause and additional text in failure reports
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/abis_nm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c
index 1a2e0955..45db8bac 100644
--- a/openbsc/src/abis_nm.c
+++ b/openbsc/src/abis_nm.c
@@ -780,6 +780,8 @@ static int rx_fail_evt_rep(struct msgb *mb)
struct abis_om_hdr *oh = msgb_l2(mb);
struct abis_om_fom_hdr *foh = msgb_l3(mb);
struct tlv_parsed tp;
+ const uint8_t *p_val;
+ char *p_text;
DEBUGPC(DNM, "Failure Event Report ");
@@ -789,6 +791,18 @@ static int rx_fail_evt_rep(struct msgb *mb)
DEBUGPC(DNM, "Type=%s ", event_type_name(*TLVP_VAL(&tp, NM_ATT_EVENT_TYPE)));
if (TLVP_PRESENT(&tp, NM_ATT_SEVERITY))
DEBUGPC(DNM, "Severity=%s ", severity_name(*TLVP_VAL(&tp, NM_ATT_SEVERITY)));
+ if (TLVP_PRESENT(&tp, NM_ATT_PROB_CAUSE)) {
+ p_val = TLVP_VAL(&tp, NM_ATT_PROB_CAUSE);
+ DEBUGPC(DNM, "Probable cause= %02X %02X %02X ", p_val[0], p_val[1], p_val[2]);
+ }
+ if (TLVP_PRESENT(&tp, NM_ATT_ADD_TEXT)) {
+ p_val = TLVP_VAL(&tp, NM_ATT_ADD_TEXT);
+ p_text = talloc_strndup(tall_bsc_ctx, (const char *) p_val, TLVP_LEN(&tp, NM_ATT_ADD_TEXT));
+ if (p_text) {
+ DEBUGPC(DNM, "Additional Text=%s ", p_text);
+ talloc_free(p_text);
+ }
+ }
DEBUGPC(DNM, "\n");