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
c34dc46f
Commit
c34dc46f
authored
Feb 18, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extensions support
parent
2eeeedc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
7 deletions
+40
-7
skeletons/constr_CHOICE.c
skeletons/constr_CHOICE.c
+40
-7
No files found.
skeletons/constr_CHOICE.c
View file @
c34dc46f
...
@@ -590,9 +590,11 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
...
@@ -590,9 +590,11 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
* Phase 0: Check that the opening tag matches our expectations.
* Phase 0: Check that the opening tag matches our expectations.
* Phase 1: Processing body and reacting on closing tag.
* Phase 1: Processing body and reacting on closing tag.
* Phase 2: Processing inner type.
* Phase 2: Processing inner type.
* Phase 3: Only waiting for closing tag
* Phase 3: Only waiting for closing tag.
* Phase 4: Skipping unknown extensions.
* Phase 5: PHASED OUT
*/
*/
for
(
edx
=
ctx
->
step
;
ctx
->
phase
<=
3
;)
{
for
(
edx
=
ctx
->
step
;
ctx
->
phase
<=
4
;)
{
pxer_chunk_type_e
ch_type
;
/* XER chunk type */
pxer_chunk_type_e
ch_type
;
/* XER chunk type */
ssize_t
ch_size
;
/* Chunk size */
ssize_t
ch_size
;
/* Chunk size */
xer_check_tag_e
tcv
;
/* Tag check value */
xer_check_tag_e
tcv
;
/* Tag check value */
...
@@ -653,6 +655,27 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
...
@@ -653,6 +655,27 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
}
}
tcv
=
xer_check_tag
(
buf_ptr
,
ch_size
,
xml_tag
);
tcv
=
xer_check_tag
(
buf_ptr
,
ch_size
,
xml_tag
);
/* Skip the extensions section */
if
(
ctx
->
phase
==
4
)
{
ASN_DEBUG
(
"skip_unknown(%d, %ld)"
,
tcv
,
(
long
)
ctx
->
left
);
switch
(
xer_skip_unknown
(
tcv
,
&
ctx
->
left
))
{
case
-
1
:
ctx
->
phase
=
5
;
RETURN
(
RC_FAIL
);
continue
;
case
1
:
ctx
->
phase
=
3
;
case
0
:
XER_ADVANCE
(
ch_size
);
continue
;
case
2
:
ctx
->
phase
=
3
;
break
;
}
}
switch
(
tcv
)
{
switch
(
tcv
)
{
case
XCT_BOTH
:
case
XCT_BOTH
:
break
;
/* No CHOICE? */
break
;
/* No CHOICE? */
...
@@ -660,7 +683,7 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
...
@@ -660,7 +683,7 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
if
(
ctx
->
phase
!=
3
)
if
(
ctx
->
phase
!=
3
)
break
;
break
;
XER_ADVANCE
(
ch_size
);
XER_ADVANCE
(
ch_size
);
ctx
->
phase
=
4
;
/* Phase out */
ctx
->
phase
=
5
;
/* Phase out */
RETURN
(
RC_OK
);
RETURN
(
RC_OK
);
case
XCT_OPENING
:
case
XCT_OPENING
:
if
(
ctx
->
phase
==
0
)
{
if
(
ctx
->
phase
==
0
)
{
...
@@ -704,11 +727,21 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
...
@@ -704,11 +727,21 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
/* It is expected extension */
/* It is expected extension */
if
(
specs
->
extensible
)
{
if
(
specs
->
extensible
)
{
ASN_DEBUG
(
"Got anticipated extension, "
ASN_DEBUG
(
"Got anticipated extension"
);
"but NOT IMPLEMENTED YET"
);
/*
/*
* TODO: implement skipping of extensions
* Check for (XCT_BOTH or XCT_UNKNOWN_BO)
* By using a mask. Only record a pure
* <opening> tags.
*/
*/
if
(
tcv
&
XCT_CLOSING
)
{
/* Found </extension> without body */
ctx
->
phase
=
3
;
/* Terminating */
}
else
{
ctx
->
left
=
1
;
ctx
->
phase
=
4
;
/* Skip ...'s */
}
XER_ADVANCE
(
ch_size
);
continue
;
}
}
/* Fall through */
/* Fall through */
...
@@ -720,7 +753,7 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
...
@@ -720,7 +753,7 @@ CHOICE_decode_xer(asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t *td,
break
;
break
;
}
}
ctx
->
phase
=
4
;
/* Phase out, just in case */
ctx
->
phase
=
5
;
/* Phase out, just in case */
RETURN
(
RC_FAIL
);
RETURN
(
RC_FAIL
);
}
}
...
...
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