X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/4271ab433cd55bbd2612292bcf39e4dc3d7274f1..1cb912e4f90473f78d2f0f10ab5c9b2c5bd36440:/libs/smux/per_decoder.c?ds=inline diff --git a/libs/smux/per_decoder.c b/libs/smux/per_decoder.c index 461b7262..a9051fb7 100644 --- a/libs/smux/per_decoder.c +++ b/libs/smux/per_decoder.c @@ -8,8 +8,10 @@ * multiple of 8 bytes. */ asn_dec_rval_t -uper_decode_complete(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, size_t size) { - asn_dec_rval_t rval; +uper_decode_complete(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, + const void *buffer, size_t size) { + asn_dec_rval_t rval; rval = uper_decode(opt_codec_ctx, td, sptr, buffer, size, 0, 0); if(rval.consumed) { @@ -37,8 +39,10 @@ uper_decode_complete(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, } asn_dec_rval_t -uper_decode(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, size_t size, int skip_bits, int unused_bits) { - asn_codec_ctx_t s_codec_ctx; +uper_decode(const asn_codec_ctx_t *opt_codec_ctx, + const asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, + size_t size, int skip_bits, int unused_bits) { + asn_codec_ctx_t s_codec_ctx; asn_dec_rval_t rval; asn_per_data_t pd; @@ -74,9 +78,9 @@ uper_decode(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, void **sp /* * Invoke type-specific decoder. */ - if(!td->uper_decoder) + if(!td->op->uper_decoder) ASN__DECODE_FAILED; /* PER is not compiled in */ - rval = td->uper_decoder(opt_codec_ctx, td, 0, sptr, &pd); + rval = td->op->uper_decoder(opt_codec_ctx, td, 0, sptr, &pd); if(rval.code == RC_OK) { /* Return the number of consumed bits */ rval.consumed = ((pd.buffer - (const uint8_t *)buffer) << 3)