Commit b3e99626 authored by BenceJanosSzabo's avatar BenceJanosSzabo
Browse files

OER coding fixes



Change-Id: I44a98bf1bb5901447ebbef087c92f55b516ff563
Signed-off-by: default avatarBenceJanosSzabo <bence.janos.szabo@ericsson.com>
parent 09357332
...@@ -3631,6 +3631,7 @@ namespace Common { ...@@ -3631,6 +3631,7 @@ namespace Common {
case T_EMBEDDED_PDV: case T_EMBEDDED_PDV:
case T_SEQOF: case T_SEQOF:
case T_EXTERNAL: case T_EXTERNAL:
case T_OBJECTDESCRIPTOR:
return true; return true;
default: default:
return false; return false;
...@@ -6793,7 +6794,10 @@ namespace Common { ...@@ -6793,7 +6794,10 @@ namespace Common {
} // case } // case
case CT_OER: { case CT_OER: {
for ( ; ; ) { for ( ; ; ) {
if (t->is_asn1()) return true; if (t->is_asn1()) {
t->set_gen_coder_functions(CT_OER);
return true;
}
//if (t->oerattrib) return true; //if (t->oerattrib) return true;
if (t->is_ref()) t = t->get_type_refd(); if (t->is_ref()) t = t->get_type_refd();
else { else {
...@@ -6806,6 +6810,7 @@ namespace Common { ...@@ -6806,6 +6810,7 @@ namespace Common {
case T_OSTR: case T_OSTR:
case T_OID: case T_OID:
// these basic TTCN-3 types have ASN.1 equivalents // these basic TTCN-3 types have ASN.1 equivalents
t->set_gen_coder_functions(CT_OER);
return true; return true;
default: default:
return false; return false;
......
...@@ -3116,6 +3116,8 @@ void Type::chk_oer() { ...@@ -3116,6 +3116,8 @@ void Type::chk_oer() {
case T_EXTERNAL: case T_EXTERNAL:
break; break;
default: default:
delete oerattrib;
oerattrib = NULL;
break; break;
} }
} }
......
...@@ -422,7 +422,7 @@ void Type::generate_code_typedescriptor(output_struct *target) ...@@ -422,7 +422,7 @@ void Type::generate_code_typedescriptor(output_struct *target)
if (generate_oer) if (generate_oer)
target->source.global_vars = mputprintf(target->source.global_vars, target->source.global_vars = mputprintf(target->source.global_vars,
"&%s_oer_, ", gennamexerdescriptor.c_str()); "&%s_oer_, ", gennameoerdescriptor.c_str());
else else
target->source.global_vars = mputprintf(target->source.global_vars, target->source.global_vars = mputprintf(target->source.global_vars,
"NULL, "); "NULL, ");
......
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