aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons/NULL.c
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2017-10-20 02:39:08 -0700
committerLev Walkin <vlm@lionet.info>2017-10-20 03:22:51 -0700
commit42f6c8801835ea837ab7b8a47fcb86e2d34e67c2 (patch)
treefb2d8bec888f409b65b0aacf1c7753c40ad7f649 /skeletons/NULL.c
parenta460cbd13e3c5f5ae003f689193dd659a2fe31bb (diff)
fix OER NULL and SEQUENCE extensions round-trip
Diffstat (limited to 'skeletons/NULL.c')
-rw-r--r--skeletons/NULL.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/skeletons/NULL.c b/skeletons/NULL.c
index 77a377e1..a43d412b 100644
--- a/skeletons/NULL.c
+++ b/skeletons/NULL.c
@@ -135,15 +135,24 @@ NULL_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
asn_dec_rval_t
NULL_decode_oer(const asn_codec_ctx_t *opt_codec_ctx,
const asn_TYPE_descriptor_t *td,
- const asn_oer_constraints_t *constraints, void **struct_ptr,
+ const asn_oer_constraints_t *constraints, void **sptr,
const void *ptr, size_t size) {
asn_dec_rval_t rv = {RC_OK, 0};
(void)opt_codec_ctx;
(void)td;
(void)constraints;
- (void)struct_ptr;
(void)ptr;
(void)size;
+
+ if(!*sptr) {
+ *sptr = MALLOC(sizeof(NULL_t));
+ if(*sptr) {
+ *(NULL_t *)*sptr = 0;
+ } else {
+ ASN__DECODE_FAILED;
+ }
+ }
+
return rv;
}