aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons/per_opentype.c
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2012-02-21 02:15:08 -0800
committerLev Walkin <vlm@lionet.info>2012-02-21 02:15:08 -0800
commit69c73dc63fc73d12b7c4ba04a98bab4561d109d6 (patch)
tree947041e423a131c4a0d547d8fc29f374146f7ba1 /skeletons/per_opentype.c
parentb4c2ca809c89ccbf2c5abbc0ef270611f60b74d9 (diff)
some reentrancy protection
Diffstat (limited to 'skeletons/per_opentype.c')
-rw-r--r--skeletons/per_opentype.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/skeletons/per_opentype.c b/skeletons/per_opentype.c
index ebcf076c..03a31d2d 100644
--- a/skeletons/per_opentype.c
+++ b/skeletons/per_opentype.c
@@ -18,8 +18,6 @@ static int uper_ugot_refill(asn_per_data_t *pd);
static int per_skip_bits(asn_per_data_t *pd, int skip_nbits);
static asn_dec_rval_t uper_sot_suck(asn_codec_ctx_t *, asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd);
-int asn_debug_indent;
-
/*
* Encode an "open type field".
* #10.1, #10.2
@@ -101,9 +99,9 @@ uper_open_type_get_simple(asn_codec_ctx_t *ctx, asn_TYPE_descriptor_t *td,
spd.buffer = buf;
spd.nbits = bufLen << 3;
- asn_debug_indent += 4;
+ ASN_DEBUG_INDENT_ADD(+4);
rv = td->uper_decoder(ctx, td, constraints, sptr, &spd);
- asn_debug_indent -= 4;
+ ASN_DEBUG_INDENT_ADD(-4);
if(rv.code == RC_OK) {
/* Check padding validity */
@@ -153,9 +151,9 @@ uper_open_type_get_complex(asn_codec_ctx_t *ctx, asn_TYPE_descriptor_t *td,
pd->nbits = pd->nboff; /* 0 good bits at this point, will refill */
pd->moved = 0; /* This now counts the open type size in bits */
- asn_debug_indent += 4;
+ ASN_DEBUG_INDENT_ADD(+4);
rv = td->uper_decoder(ctx, td, constraints, sptr, pd);
- asn_debug_indent -= 4;
+ ASN_DEBUG_INDENT_ADD(-4);
#define UPDRESTOREPD do { \
/* buffer and nboff are valid, preserve them. */ \