Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
8c2ca0b0
Commit
8c2ca0b0
authored
Sep 17, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XER reference types encoding error
parent
a9532f4d
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
867 additions
and
1 deletion
+867
-1
examples/sample.makefile.regen
examples/sample.makefile.regen
+17
-0
examples/sample.source.MHEG5/Makefile
examples/sample.source.MHEG5/Makefile
+17
-0
libasn1compiler/asn1c_C.c
libasn1compiler/asn1c_C.c
+5
-1
tests/37-indirect-choice-OK.asn1
tests/37-indirect-choice-OK.asn1
+3
-0
tests/37-indirect-choice-OK.asn1.-EF
tests/37-indirect-choice-OK.asn1.-EF
+6
-0
tests/37-indirect-choice-OK.asn1.-P
tests/37-indirect-choice-OK.asn1.-P
+819
-0
No files found.
examples/sample.makefile.regen
View file @
8c2ca0b0
...
@@ -65,6 +65,23 @@ cat Makefile.am.sample \
...
@@ -65,6 +65,23 @@ cat Makefile.am.sample \
echo
' diff ./.tmp.1.$$ ./.tmp.2.$$ || exit 2; \'
echo
' diff ./.tmp.1.$$ ./.tmp.2.$$ || exit 2; \'
echo
' rm -f ./.tmp.[12].$$; \'
echo
' rm -f ./.tmp.[12].$$; \'
echo
' done; fi'
echo
' done; fi'
echo
" @if test -f ./sample-
${
ASN1PDU
}
-1.xer ; then
\\
"
echo
" for f in ./sample-
${
ASN1PDU
}
-*.xer; do
\\
"
echo
' echo "Recoding $$f into DER and back..."; \'
echo
' ./${TARGET} -ixer -oder $$f > ./.tmp.1.$$ || exit 2; \'
echo
' ./${TARGET} -iber -oxer ./.tmp.1.$$ > ./.tmp.2.$$ || exit 2; \'
echo
' diff $$f ./.tmp.2.$$ || exit 2; \'
echo
' rm -f ./.tmp.[12].$$; \'
echo
' done; fi'
echo
" @if test -f ./sample-
${
ASN1PDU
}
-1.per ; then
\\
"
echo
" for f in ./sample-
${
ASN1PDU
}
-*.per; do
\\
"
echo
' echo "Recoding $$f into DER into XER and back..."; \'
echo
' ./${TARGET} -iper -oder $$f > ./.tmp.1.$$ || exit 2; \'
echo
' ./${TARGET} -ider -oxer ./.tmp.1.$$ > ./.tmp.2.$$ || exit 2; \'
echo
' ./${TARGET} -ixer -oper ./.tmp.2.$$ > ./.tmp.1.$$ || exit 2; \'
echo
' diff $$f ./.tmp.1.$$ || exit 2; \'
echo
' rm -f ./.tmp.[12].$$; \'
echo
' done; fi'
echo
' @echo ================'
echo
' @echo ================'
echo
' @echo All tests passed'
echo
' @echo All tests passed'
echo
' @echo ================'
echo
' @echo ================'
...
...
examples/sample.source.MHEG5/Makefile
View file @
8c2ca0b0
...
@@ -498,6 +498,23 @@ check: ${TARGET}
...
@@ -498,6 +498,23 @@ check: ${TARGET}
diff ./.tmp.1.
$$
./.tmp.2.
$$
||
exit
2
;
\
diff ./.tmp.1.
$$
./.tmp.2.
$$
||
exit
2
;
\
rm
-f
./.tmp.[12].
$$
;
\
rm
-f
./.tmp.[12].
$$
;
\
done
;
fi
done
;
fi
@
if
test
-f
./sample-InterchangedObject-1.xer
;
then
\
for
f
in
./sample-InterchangedObject-
*
.xer
;
do
\
echo
"Recoding
$$
f into DER and back..."
;
\
./
${TARGET}
-ixer
-oder
$$
f
>
./.tmp.1.
$$
||
exit
2
;
\
./
${TARGET}
-iber
-oxer
./.tmp.1.
$$
>
./.tmp.2.
$$
||
exit
2
;
\
diff
$$
f ./.tmp.2.
$$
||
exit
2
;
\
rm
-f
./.tmp.[12].
$$
;
\
done
;
fi
@
if
test
-f
./sample-InterchangedObject-1.per
;
then
\
for
f
in
./sample-InterchangedObject-
*
.per
;
do
\
echo
"Recoding
$$
f into DER into XER and back..."
;
\
./
${TARGET}
-iper
-oder
$$
f
>
./.tmp.1.
$$
||
exit
2
;
\
./
${TARGET}
-ider
-oxer
./.tmp.1.
$$
>
./.tmp.2.
$$
||
exit
2
;
\
./
${TARGET}
-ixer
-oper
./.tmp.2.
$$
>
./.tmp.1.
$$
||
exit
2
;
\
diff
$$
f ./.tmp.1.
$$
||
exit
2
;
\
rm
-f
./.tmp.[12].
$$
;
\
done
;
fi
@
echo
================
@
echo
================
@
echo
All tests passed
@
echo
All tests passed
@
echo
================
@
echo
================
...
...
libasn1compiler/asn1c_C.c
View file @
8c2ca0b0
...
@@ -2193,9 +2193,12 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
...
@@ -2193,9 +2193,12 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
*/
*/
static
int
static
int
emit_type_DEF
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
,
enum
tvm_compat
tv_mode
,
int
tags_count
,
int
all_tags_count
,
int
elements_count
,
enum
etd_spec
spec
)
{
emit_type_DEF
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
,
enum
tvm_compat
tv_mode
,
int
tags_count
,
int
all_tags_count
,
int
elements_count
,
enum
etd_spec
spec
)
{
asn1p_expr_t
*
terminal
;
int
using_type_name
=
0
;
int
using_type_name
=
0
;
char
*
p
=
MKID
(
expr
);
char
*
p
=
MKID
(
expr
);
terminal
=
asn1f_find_terminal_type_ex
(
arg
->
asn
,
expr
);
if
((
arg
->
flags
&
A1C_GEN_PER
)
if
((
arg
->
flags
&
A1C_GEN_PER
)
&&
(
expr
->
constraints
&&
(
expr
->
constraints
||
expr
->
expr_type
==
ASN_BASIC_ENUMERATED
||
expr
->
expr_type
==
ASN_BASIC_ENUMERATED
...
@@ -2255,7 +2258,8 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_
...
@@ -2255,7 +2258,8 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_
"use
\"
-gen-PER
\"
to enable */
\n
"
);
"use
\"
-gen-PER
\"
to enable */
\n
"
);
}
}
if
(
expr
->
expr_type
==
ASN_CONSTR_CHOICE
)
{
if
(
!
terminal
||
terminal
->
expr_type
==
ASN_CONSTR_CHOICE
)
{
//if(expr->expr_type == ASN_CONSTR_CHOICE) {
OUT
(
"CHOICE_outmost_tag,
\n
"
);
OUT
(
"CHOICE_outmost_tag,
\n
"
);
}
else
{
}
else
{
OUT
(
"0,
\t
/* Use generic outmost tag fetcher */
\n
"
);
OUT
(
"0,
\t
/* Use generic outmost tag fetcher */
\n
"
);
...
...
tests/37-indirect-choice-OK.asn1
View file @
8c2ca0b0
...
@@ -31,5 +31,8 @@ BEGIN
...
@@ -31,5 +31,8 @@ BEGIN
}
}
Choice3 ::= [3] EXPLICIT Choice2 -- tags [3] [2]
Choice3 ::= [3] EXPLICIT Choice2 -- tags [3] [2]
Choice4 ::= [4] IMPLICIT Choice2 -- tags [4]
Choice5 ::= Choice2 -- tags [2]
Choice6 ::= Choice1 -- tags
END
END
tests/37-indirect-choice-OK.asn1.-EF
View file @
8c2ca0b0
...
@@ -24,4 +24,10 @@ Choice2 ::= [2] EXPLICIT CHOICE {
...
@@ -24,4 +24,10 @@ Choice2 ::= [2] EXPLICIT CHOICE {
Choice3 ::= [3] EXPLICIT Choice2
Choice3 ::= [3] EXPLICIT Choice2
Choice4 ::= [4] IMPLICIT Choice2
Choice5 ::= Choice2
Choice6 ::= Choice1
END
END
tests/37-indirect-choice-OK.asn1.-P
0 → 100644
View file @
8c2ca0b0
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment