couting overhead
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1324 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/skeletons/constr_SEQUENCE.c b/skeletons/constr_SEQUENCE.c
index bcdf2ca..8af6cb9 100644
--- a/skeletons/constr_SEQUENCE.c
+++ b/skeletons/constr_SEQUENCE.c
@@ -1092,7 +1092,7 @@
pd->buffer = oldpd->buffer;
pd->nboff = oldpd->nboff - 1;
pd->nbits = oldpd->nbits;
- ASN_DEBUG("====================");
+ ASN_DEBUG("Return from unclaimed");
return 0;
}
@@ -1145,10 +1145,9 @@
rv = td->uper_decoder(opt_codec_ctx, td, constraints, sptr, pd);
- ASN_DEBUG("Open type %s consumed %d off of %d unclaimed=%d, repeat=%d, nbdiff=%d (%d->%d, old=%d (%d->%d))",
- td->name, pd->moved, arg.oldpd.moved, arg.unclaimed, arg.repeat,
- pd->nbits - pd->nboff, pd->nboff, pd->nbits,
- arg.oldpd.nbits - arg.oldpd.nboff, arg.oldpd.nboff, arg.oldpd.nbits);
+ ASN_DEBUG("Open type %s consumed %d off of %d unclaimed=%d, repeat=%d",
+ td->name, pd->moved, arg.oldpd.moved,
+ arg.unclaimed, arg.repeat);
padding = pd->moved % 8;
if(padding) {
@@ -1170,12 +1169,9 @@
}
}
if(pd->nbits != pd->nboff) {
- ASN_DEBUG("Open type container overhead of %d off %d bits!", pd->nbits - pd->nboff, arg.oldpd.moved + pd->moved);
- if(0) _ASN_DECODE_FAILED;
- /* Ignore unwanted overheads */
- arg.oldpd.moved += pd->nbits - pd->nboff;
- //pd->moved += pd->nbits - pd->nboff;
- pd->nboff = pd->nbits;
+ ASN_DEBUG("Open type container overhead of %d bits!", pd->nbits - pd->nboff);
+ if(1) _ASN_DECODE_FAILED;
+ arg.unclaimed += pd->nbits - pd->nboff;
}
arg.oldpd.nbits -= pd->moved - arg.ot_moved;
arg.oldpd.moved += pd->moved - arg.ot_moved;
diff --git a/skeletons/per_support.c b/skeletons/per_support.c
index c9c9594..6187f2c 100644
--- a/skeletons/per_support.c
+++ b/skeletons/per_support.c
@@ -47,8 +47,8 @@
return tailv;
}
- ASN_DEBUG("[PER get %d bits from %p+%d bits, %d available]",
- nbits, pd->buffer, pd->nboff, nleft);
+ ASN_DEBUG("[PER get %d bits from (%d@%d+%d)]",
+ nbits, pd->moved, pd->nboff, nleft);
/*
* Normalize position indicator.