ranap_common: add decoder for RAB-FailedList

There is currently no decoder to decode RAB-FailedList objects properly.
Lets add one.

Change-Id: I0f42487968f2a39f2425068c001950509a3bd28f
Related: OS#5152
changes/36/27136/2
Philipp Maier 12 months ago
parent d97f94a7ea
commit 7755801cf5
  1. 5
      include/osmocom/ranap/ranap_common.h
  2. 23
      src/ranap_common.c

@ -647,6 +647,11 @@ int ranap_decode_rab_setupormodifieditemies_fromlist(
RANAP_RAB_SetupOrModifiedItemIEs_t *raB_SetupOrModifiedItemIEs,
ANY_t *any_p);
/* There is no generated decoder available, this is a custom one */
int ranap_decode_rab_faileditemies_fromlist(
RANAP_RAB_FailedItemIEs_t *raB_FailedItemIEs,
ANY_t *any_p);
/* There is no generated decoder available, this is a custom one */
int ranap_decode_rab_setupormodifyitemfirst(
RANAP_RAB_SetupOrModifyItemFirst_t *raB_SetupOrModifyItemFirst,

@ -582,6 +582,29 @@ int ranap_decode_rab_setupormodifieditemies_fromlist(
return decoded;
}
int ranap_decode_rab_faileditemies_fromlist(RANAP_RAB_FailedItemIEs_t *raB_FailedItemIEs, ANY_t *any_p)
{
RANAP_RAB_FailedItem_t *ranaP_RABFailedItem_p = NULL;
int decoded;
assert(any_p != NULL);
assert(raB_FailedItemIEs != NULL);
memset(raB_FailedItemIEs, 0, sizeof(RANAP_RAB_FailedItemIEs_t));
RANAP_DEBUG("Decoding message RANAP_RAB_FailedItemIEs (%s:%d)\n", __FILE__, __LINE__);
decoded = ANY_to_type_aper(any_p, &asn_DEF_RANAP_RAB_FailedItem, (void **)&ranaP_RABFailedItem_p);
if (decoded < 0) {
LOGP(DRANAP, LOGL_ERROR, "Decoding of IE raB_FailedItem failed\n");
return -1;
}
if (asn1_xer_print)
xer_fprint(stdout, &asn_DEF_RANAP_RAB_FailedItem, ranaP_RABFailedItem_p);
memcpy(&raB_FailedItemIEs->raB_FailedItem, ranaP_RABFailedItem_p, sizeof(RANAP_RAB_FailedItem_t));
FREEMEM(ranaP_RABFailedItem_p);
return decoded;
}
int ranap_decode_rab_setupormodifyitemfirst(
RANAP_RAB_SetupOrModifyItemFirst_t *raB_SetupOrModifyItemFirst,
ANY_t *any_p)

Loading…
Cancel
Save