mirror of https://gerrit.osmocom.org/asn1c
use oer guara
This commit is contained in:
parent
42f6c88018
commit
9d328eec0a
|
@ -346,12 +346,6 @@ SEQUENCE_decode_oer(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
} else {
|
} else {
|
||||||
/* Roll back open type parsing */
|
/* Roll back open type parsing */
|
||||||
asn_get_undo(extadds, 1);
|
asn_get_undo(extadds, 1);
|
||||||
if(memb_ptr2 == &tmp_memb_ptr) {
|
|
||||||
ASN_STRUCT_RESET(*elm->type, *memb_ptr2);
|
|
||||||
} else {
|
|
||||||
ASN_STRUCT_FREE(*elm->type, *memb_ptr2);
|
|
||||||
*memb_ptr2 = NULL;
|
|
||||||
}
|
|
||||||
RETURN(RC_WMORE);
|
RETURN(RC_WMORE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -563,7 +557,6 @@ SEQUENCE_encode_oer(const asn_TYPE_descriptor_t *td,
|
||||||
ssize_t wrote = oer_open_type_put(
|
ssize_t wrote = oer_open_type_put(
|
||||||
elm->type, elm->encoding_constraints.oer_constraints,
|
elm->type, elm->encoding_constraints.oer_constraints,
|
||||||
memb_ptr, cb, app_key);
|
memb_ptr, cb, app_key);
|
||||||
ASN_DEBUG("Open type %s encoded in %zd, +computed=%zu", elm->type->name, wrote, computed_size);
|
|
||||||
if(wrote == -1) {
|
if(wrote == -1) {
|
||||||
ASN__ENCODE_FAILED;
|
ASN__ENCODE_FAILED;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,7 @@ oer_open_type_get(const asn_codec_ctx_t *opt_codec_ctx,
|
||||||
} else {
|
} else {
|
||||||
/* Even if RC_WMORE, we can't get more data into a closed container. */
|
/* Even if RC_WMORE, we can't get more data into a closed container. */
|
||||||
td->op->free_struct(td, *struct_ptr, dispose_method);
|
td->op->free_struct(td, *struct_ptr, dispose_method);
|
||||||
|
*struct_ptr = NULL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue