hnbgw_ranap: Print RANAP Cause in RESET and ERROR INDICATION

This commit is contained in:
Harald Welte 2015-12-25 10:25:01 +01:00
parent c3ca7eba18
commit 23058e1144
1 changed files with 21 additions and 1 deletions

View File

@ -64,7 +64,8 @@ static int ranap_rx_init_reset(struct hnb_context *hnb, ANY_t *in)
if (ies.cN_DomainIndicator == RANAP_CN_DomainIndicator_ps_domain)
is_ps=1;
DEBUGP(DRANAP, "RESET.req(%s)\n", is_ps ? "ps" : "cs");
LOGP(DRANAP, LOGL_INFO, "Rx RESET.req(%s,%s)\n", is_ps ? "ps" : "cs",
ranap_cause_str(&ies.cause));
/* FIXME: Actually we have to wait for some guard time? */
/* FIXME: Reset all resources related to this HNB/RNC */
@ -73,6 +74,24 @@ static int ranap_rx_init_reset(struct hnb_context *hnb, ANY_t *in)
return 0;
}
static int ranap_rx_error_ind(struct hnb_context *hnb, ANY_t *in)
{
RANAP_ErrorIndicationIEs_t ies;
int rc, is_ps = 0;
rc = ranap_decode_errorindicationies(&ies, in);
if (rc < 0)
return rc;
if (ies.presenceMask & ERRORINDICATIONIES_RANAP_CAUSE_PRESENT) {
LOGP(DRANAP, LOGL_ERROR, "Rx ERROR.ind(%s)\n",
ranap_cause_str(&ies.cause));
} else
LOGP(DRANAP, LOGL_ERROR, "Rx ERROR.ind\n");
return 0;
}
int ranap_parse_lai(struct gprs_ra_id *ra_id, const RANAP_LAI_t *lai)
{
uint8_t *ptr = lai->pLMNidentity.buf;
@ -143,6 +162,7 @@ static int ranap_rx_initiating_msg(struct hnb_context *hnb, RANAP_InitiatingMess
case RANAP_ProcedureCode_id_OverloadControl: /* Overload ind */
break;
case RANAP_ProcedureCode_id_ErrorIndication: /* Error ind */
rc = ranap_rx_error_ind(hnb, &imsg->value);
break;
case RANAP_ProcedureCode_id_ResetResource: /* request */
case RANAP_ProcedureCode_id_InformationTransfer: