aboutsummaryrefslogtreecommitdiffstats
path: root/src/hnbgw_hnbap.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-09-11 17:03:16 +0200
committerHarald Welte <laforge@gnumonks.org>2015-09-11 17:03:16 +0200
commit3af1db87edfa3c91efa9911d2f786f4b931750d6 (patch)
tree60305c189e679587ea5dcbdd1696f8c8f01ba4dd /src/hnbgw_hnbap.c
parent10dfc5a97daae6bbd16a10d5d2fd39e2ef77fb34 (diff)
hnbap: Print error messages in error cases
Diffstat (limited to 'src/hnbgw_hnbap.c')
-rw-r--r--src/hnbgw_hnbap.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/hnbgw_hnbap.c b/src/hnbgw_hnbap.c
index 7810573..8b1527e 100644
--- a/src/hnbgw_hnbap.c
+++ b/src/hnbgw_hnbap.c
@@ -192,6 +192,21 @@ static int hnbgw_rx_ue_register_req(struct hnb_context *ctx, ANY_t *in)
return hnbgw_tx_ue_register_acc(ue);
}
+static int hnbgw_rx_err_ind(struct hnb_context *hnb, ANY_t *in)
+{
+ ErrorIndicationIEs_t ies;
+ int rc;
+
+ rc = hnbap_decode_hnbregisterrequesties(&ies, in);
+ if (rc < 0)
+ return rc;
+
+ LOGP(DMAIN, LOGL_NOTICE, "HNBAP ERROR.ind, cause: %s\n",
+ hnbap_cause_str(&ies.cause));
+
+ return 0;
+}
+
static int hnbgw_rx_initiating_msg(struct hnb_context *hnb, InitiatingMessage_t *imsg)
{
int rc;
@@ -208,13 +223,19 @@ static int hnbgw_rx_initiating_msg(struct hnb_context *hnb, InitiatingMessage_t
case ProcedureCode_id_UEDe_Register: /* 8.5 */
break;
case ProcedureCode_id_ErrorIndication: /* 8.6 */
+ rc = hnbgw_rx_err_ind(hnb, &imsg->value);
+ break;
case ProcedureCode_id_TNLUpdate: /* 8.9 */
case ProcedureCode_id_HNBConfigTransfer: /* 8.10 */
case ProcedureCode_id_RelocationComplete: /* 8.11 */
case ProcedureCode_id_U_RNTIQuery: /* 8.12 */
case ProcedureCode_id_privateMessage:
+ LOGP(DMAIN, LOGL_NOTICE, "Unimplemented HNBAP Procedure %u\n",
+ imsg->procedureCode);
break;
default:
+ LOGP(DMAIN, LOGL_NOTICE, "Unknown HNBAP Procedure %u\n",
+ imsg->procedureCode);
break;
}
}
@@ -247,6 +268,8 @@ static int _hnbgw_hnbap_rx(struct hnb_context *hnb, HNBAP_PDU_t *pdu)
rc = hnbgw_rx_unsuccessful_outcome_msg(hnb, &pdu->choice.unsuccessfulOutcome);
break;
default:
+ LOGP(DMAIN, LOGL_NOTICE, "Unknown HNBAP Presence %u\n",
+ pdu->present);
return -1;
}
}