Commit 3e2de696 authored by Bi-Ruei, Chiu's avatar Bi-Ruei, Chiu Committed by Lev Walkin

Solve the problem that information object table with one entry can not be properly handled

E-RABToBeSetupItemBearerSUReqIEs S1AP-PROTOCOL-IES ::= {
    { ID id-E-RABToBeSetupItemBearerSUReq   CRITICALITY reject	TYPE E-RABToBeSetupItemBearerSUReq	PRESENCE mandatory },
    ...
}

result in 'FATAL: Information Object Set E-RABToBeSetupItemBearerSUReqIEs contains no objects at line xxxx'

If it contains more than one entry then there is no problem.

E-RABSetupRequestIEs S1AP-PROTOCOL-IES ::= {
    { ID id-MME-UE-S1AP-ID                  CRITICALITY reject  TYPE MME-UE-S1AP-ID                     PRESENCE mandatory }|
    { ID id-eNB-UE-S1AP-ID                  CRITICALITY reject  TYPE ENB-UE-S1AP-ID                     PRESENCE mandatory }|
    { ID id-uEaggregateMaximumBitrate       CRITICALITY reject  TYPE UEAggregateMaximumBitrate          PRESENCE optional  }|
    { ID id-E-RABToBeSetupListBearerSUReq   CRITICALITY reject  TYPE E-RABToBeSetupListBearerSUReq      PRESENCE mandatory },
    ...
}
parent 214c4919
#include <stdio.h>
#include <stdlib.h>
#include "asn1fix_internal.h"
#include "asn1fix_cws.h"
......@@ -195,6 +197,8 @@ _asn1f_foreach_unparsed(arg_t *arg, const asn1p_constraint_t *ct,
return _asn1f_foreach_unparsed_union(ct, process, keyp);
case ACT_CA_CSV: /* , */
break;
case ACT_EL_VALUE:
return 0;
}
for(size_t i = 0; i < ct->el_count; i++) {
......@@ -407,7 +411,7 @@ _asn1f_assign_cell_value(arg_t *arg, struct asn1p_ioc_cell_s *cell,
/* This value 100 should be larger than following formatting string */
psize = bend - buf + 100;
pp = malloc(psize);
pp = calloc(1, psize);
if(pp == NULL) {
free(mivr);
return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment