diff options
author | Lev Walkin <vlm@lionet.info> | 2007-07-23 07:47:04 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2007-07-23 07:47:04 +0000 |
commit | 39248f17f4763a57ac0e2116a9e992551782df83 (patch) | |
tree | 8a562de5d2d529b0563f5fbbc79d2e1191d3098f /skeletons/NativeEnumerated.c | |
parent | 08afe612de9d1b255a8b8b58ee62ea8340a58ac4 (diff) |
extensibility encoding
Diffstat (limited to 'skeletons/NativeEnumerated.c')
-rw-r--r-- | skeletons/NativeEnumerated.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/skeletons/NativeEnumerated.c b/skeletons/NativeEnumerated.c index e3af1ca4..12b079e1 100644 --- a/skeletons/NativeEnumerated.c +++ b/skeletons/NativeEnumerated.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2004 Lev Walkin <vlm@lionet.info>. All rights reserved. + * Copyright (c) 2004, 2007 Lev Walkin <vlm@lionet.info>. All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ /* @@ -177,7 +177,7 @@ NativeEnumerated_encode_uper(asn_TYPE_descriptor_t *td, inext = 1; } if(ct->flags & APC_EXTENSIBLE) { - if(per_put_few_bits(po, inext, 0)) + if(per_put_few_bits(po, inext, 1)) _ASN_ENCODE_FAILED; ct = 0; } else if(inext) { @@ -196,7 +196,10 @@ NativeEnumerated_encode_uper(asn_TYPE_descriptor_t *td, /* * X.691, #10.6: normally small non-negative whole number; */ - if(uper_put_nsnnwn(po, value - (specs->extension - 1))) + ASN_DEBUG("value = %d, ext = %d, inext = %d, res = %d", + value, specs->extension, inext, + value - (inext ? (specs->extension - 1) : 0)); + if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0))) _ASN_ENCODE_FAILED; _ASN_ENCODED_OK(er); |