aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2006-09-28 07:45:14 +0000
committerLev Walkin <vlm@lionet.info>2006-09-28 07:45:14 +0000
commit8b8381f490bc5127911d1cc3b0b6f0ebb8c31035 (patch)
tree5fa9833513d73266138aab219afbcba9051fd728 /skeletons
parent1f12da4718415b094074da4a864eb59a594000b6 (diff)
flushing from the right point
Diffstat (limited to 'skeletons')
-rw-r--r--skeletons/per_support.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/skeletons/per_support.c b/skeletons/per_support.c
index c8344193..0bb3d4b7 100644
--- a/skeletons/per_support.c
+++ b/skeletons/per_support.c
@@ -193,8 +193,8 @@ per_put_few_bits(asn_per_outp_t *po, uint32_t bits, int obits) {
if(obits <= 0 || obits >= 32) return obits ? -1 : 0;
- ASN_DEBUG("[PER put %d bits to %p+%d bits]",
- obits, po->buffer, po->nboff);
+ ASN_DEBUG("[PER put %d bits %x to %p+%d bits]",
+ obits, bits, po->buffer, po->nboff);
/*
* Normalize position indicator.
@@ -210,7 +210,9 @@ per_put_few_bits(asn_per_outp_t *po, uint32_t bits, int obits) {
*/
if(po->nboff + obits > po->nbits) {
int complete_bytes = (po->buffer - po->tmpspace);
- if(po->outper(po->buffer, complete_bytes, po->op_key) < 0)
+ ASN_DEBUG("[PER output %d complete + %d]",
+ complete_bytes, po->flushed_bytes);
+ if(po->outper(po->tmpspace, complete_bytes, po->op_key) < 0)
return -1;
if(po->nboff)
po->tmpspace[0] = po->buffer[0];