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 },
    ...
}
This commit is contained in:
Bi-Ruei, Chiu 2017-10-19 00:41:15 +08:00 committed by Lev Walkin
parent 214c491951
commit 3e2de6960b
1 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,5 @@
#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;