Commit 73a5cc65 authored by Lev Walkin's avatar Lev Walkin

complex data

parent 7608b04e
...@@ -238,14 +238,30 @@ compare_with_data_out(const char *fname, char *buf, int size) { ...@@ -238,14 +238,30 @@ compare_with_data_out(const char *fname, char *buf, int size) {
fprintf(stderr, "Comparing PER output with [%s]\n", outName); fprintf(stderr, "Comparing PER output with [%s]\n", outName);
if(strstr(outName, "-0-6-P.out")) { if(strstr(outName, "-06-P.out")) {
f = fopen(outName, "w");
fbuf[0] = 0x81;
fbuf[1] = 0x40;
fbuf[2] = 0x00;
fwrite(fbuf, 1, 3, f);
fclose(f);
}
if(strstr(outName, "-07-P.out")) {
f = fopen(outName, "w");
fbuf[0] = 0x81;
fbuf[1] = 0x40;
fbuf[2] = 0x40;
fwrite(fbuf, 1, 3, f);
fclose(f);
}
if(strstr(outName, "-08-P.out")) {
f = fopen(outName, "w"); f = fopen(outName, "w");
fbuf[0] = 0x81; fbuf[0] = 0x81;
fbuf[1] = 0x40; fbuf[1] = 0x40;
fbuf[2] = 0x80; fbuf[2] = 0x80;
fbuf[3] = 0x00; fwrite(fbuf, 1, 3, f);
fbuf[4] = 0x00;
fwrite(fbuf, 1, 5, f);
fclose(f); fclose(f);
} }
......
...@@ -1249,6 +1249,7 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, ...@@ -1249,6 +1249,7 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
} }
/* Prepare a place and read-in the presence bitmap */ /* Prepare a place and read-in the presence bitmap */
memset(&opmd, 0, sizeof(opmd));
if(specs->roms_count) { if(specs->roms_count) {
opres = (uint8_t *)MALLOC(((specs->roms_count + 7) >> 3) + 1); opres = (uint8_t *)MALLOC(((specs->roms_count + 7) >> 3) + 1);
if(!opres) _ASN_DECODE_FAILED; if(!opres) _ASN_DECODE_FAILED;
...@@ -1258,13 +1259,11 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, ...@@ -1258,13 +1259,11 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
_ASN_DECODE_STARVED; _ASN_DECODE_STARVED;
} }
opmd.buffer = opres; opmd.buffer = opres;
opmd.nboff = 0;
opmd.nbits = specs->roms_count; opmd.nbits = specs->roms_count;
ASN_DEBUG("Read in presence bitmap for %s of %d bits (%x..)", ASN_DEBUG("Read in presence bitmap for %s of %d bits (%x..)",
td->name, specs->roms_count, *opres); td->name, specs->roms_count, *opres);
} else { } else {
opres = 0; opres = 0;
memset(&opmd, 0, sizeof opmd);
} }
/* /*
...@@ -1342,8 +1341,8 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td, ...@@ -1342,8 +1341,8 @@ SEQUENCE_decode_uper(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
if(per_get_many_bits(pd, epres, 0, bmlength)) if(per_get_many_bits(pd, epres, 0, bmlength))
_ASN_DECODE_STARVED; _ASN_DECODE_STARVED;
memset(&epmd, 0, sizeof(epmd));
epmd.buffer = epres; epmd.buffer = epres;
epmd.nboff = 0;
epmd.nbits = bmlength; epmd.nbits = bmlength;
ASN_DEBUG("Read in extensions bitmap for %s of %d bits (%x..)", ASN_DEBUG("Read in extensions bitmap for %s of %d bits (%x..)",
td->name, bmlength, *epres); td->name, bmlength, *epres);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment