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
3b3df154
Commit
3b3df154
authored
Oct 12, 2021
by
Senthil Prabakaran
Committed by
Mouse
May 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix JSON issues
parent
a9142343
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
6 deletions
+21
-6
skeletons/OCTET_STRING_jer.c
skeletons/OCTET_STRING_jer.c
+1
-1
skeletons/constr_CHOICE_jer.c
skeletons/constr_CHOICE_jer.c
+2
-1
skeletons/constr_SEQUENCE_OF_jer.c
skeletons/constr_SEQUENCE_OF_jer.c
+6
-1
skeletons/constr_SEQUENCE_jer.c
skeletons/constr_SEQUENCE_jer.c
+12
-3
No files found.
skeletons/OCTET_STRING_jer.c
View file @
3b3df154
...
@@ -42,7 +42,7 @@ OCTET_STRING_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
...
@@ -42,7 +42,7 @@ OCTET_STRING_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
}
}
if
(
p
-
scratch
)
{
if
(
p
-
scratch
)
{
p
--
;
/* Remove the tail space */
p
--
;
/* Remove the tail space */
ASN__CALLBACK
(
scratch
,
p
-
scratch
);
/* Dump the rest */
ASN__CALLBACK
3
(
"
\"
"
,
1
,
scratch
,
p
-
scratch
,
"
\"
"
,
1
);
/* Dump the rest */
if
(
st
->
size
>
16
)
if
(
st
->
size
>
16
)
ASN__TEXT_INDENT
(
1
,
ilevel
-
1
);
ASN__TEXT_INDENT
(
1
,
ilevel
-
1
);
}
}
...
...
skeletons/constr_CHOICE_jer.c
View file @
3b3df154
...
@@ -62,13 +62,14 @@ CHOICE_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
...
@@ -62,13 +62,14 @@ CHOICE_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
er
.
encoded
=
0
;
er
.
encoded
=
0
;
ASN__CALLBACK3
(
"
\"
"
,
1
,
mname
,
mlen
,
"
\"
"
,
1
);
ASN__CALLBACK3
(
"
{
\n\"
"
,
3
,
mname
,
mlen
,
"
\"
: "
,
2
);
tmper
=
elm
->
type
->
op
->
jer_encoder
(
elm
->
type
,
memb_ptr
,
tmper
=
elm
->
type
->
op
->
jer_encoder
(
elm
->
type
,
memb_ptr
,
ilevel
+
1
,
flags
,
cb
,
app_key
);
ilevel
+
1
,
flags
,
cb
,
app_key
);
if
(
tmper
.
encoded
==
-
1
)
return
tmper
;
if
(
tmper
.
encoded
==
-
1
)
return
tmper
;
er
.
encoded
+=
tmper
.
encoded
;
er
.
encoded
+=
tmper
.
encoded
;
ASN__CALLBACK
(
"}"
,
1
);
// ASN__CALLBACK3("</", 2, mname, mlen, ">", 1);
// ASN__CALLBACK3("</", 2, mname, mlen, ">", 1);
}
}
...
...
skeletons/constr_SEQUENCE_OF_jer.c
View file @
3b3df154
...
@@ -25,6 +25,7 @@ SEQUENCE_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
...
@@ -25,6 +25,7 @@ SEQUENCE_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
if
(
!
sptr
)
ASN__ENCODE_FAILED
;
if
(
!
sptr
)
ASN__ENCODE_FAILED
;
er
.
encoded
=
0
;
er
.
encoded
=
0
;
ASN__CALLBACK
(
"["
,
1
);
for
(
i
=
0
;
i
<
list
->
count
;
i
++
)
{
for
(
i
=
0
;
i
<
list
->
count
;
i
++
)
{
asn_enc_rval_t
tmper
=
{
0
,
0
,
0
};
asn_enc_rval_t
tmper
=
{
0
,
0
,
0
};
...
@@ -33,7 +34,7 @@ SEQUENCE_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
...
@@ -33,7 +34,7 @@ SEQUENCE_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
if
(
mname
)
{
if
(
mname
)
{
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
);
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
);
ASN__CALLBACK3
(
"
\"
"
,
1
,
mname
,
mlen
,
"
\"
:{"
,
3
);
ASN__CALLBACK3
(
"
{
\"
"
,
2
,
mname
,
mlen
,
"
\"
:"
,
2
);
}
}
tmper
=
elm
->
type
->
op
->
jer_encoder
(
elm
->
type
,
memb_ptr
,
ilevel
+
1
,
tmper
=
elm
->
type
->
op
->
jer_encoder
(
elm
->
type
,
memb_ptr
,
ilevel
+
1
,
...
@@ -50,9 +51,13 @@ SEQUENCE_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
...
@@ -50,9 +51,13 @@ SEQUENCE_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
if
(
mname
)
{
if
(
mname
)
{
ASN__CALLBACK
(
"}"
,
1
);
ASN__CALLBACK
(
"}"
,
1
);
}
}
if
(
i
!=
list
->
count
-
1
)
{
ASN__CALLBACK
(
","
,
1
);
}
}
}
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
-
1
);
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
-
1
);
ASN__CALLBACK
(
"]"
,
1
);
ASN__ENCODED_OK
(
er
);
ASN__ENCODED_OK
(
er
);
cb_failed:
cb_failed:
...
...
skeletons/constr_SEQUENCE_jer.c
View file @
3b3df154
...
@@ -20,6 +20,8 @@ asn_enc_rval_t SEQUENCE_encode_jer(const asn_TYPE_descriptor_t *td, const void *
...
@@ -20,6 +20,8 @@ asn_enc_rval_t SEQUENCE_encode_jer(const asn_TYPE_descriptor_t *td, const void *
er
.
encoded
=
0
;
er
.
encoded
=
0
;
int
bAddComma
=
0
;
ASN__CALLBACK
(
"{
\n
"
,
2
);
for
(
edx
=
0
;
edx
<
td
->
elements_count
;
edx
++
)
{
for
(
edx
=
0
;
edx
<
td
->
elements_count
;
edx
++
)
{
asn_enc_rval_t
tmper
=
{
0
,
0
,
0
};
asn_enc_rval_t
tmper
=
{
0
,
0
,
0
};
asn_TYPE_member_t
*
elm
=
&
td
->
elements
[
edx
];
asn_TYPE_member_t
*
elm
=
&
td
->
elements
[
edx
];
...
@@ -50,8 +52,13 @@ asn_enc_rval_t SEQUENCE_encode_jer(const asn_TYPE_descriptor_t *td, const void *
...
@@ -50,8 +52,13 @@ asn_enc_rval_t SEQUENCE_encode_jer(const asn_TYPE_descriptor_t *td, const void *
memb_ptr
=
(
const
void
*
)((
const
char
*
)
sptr
+
elm
->
memb_offset
);
memb_ptr
=
(
const
void
*
)((
const
char
*
)
sptr
+
elm
->
memb_offset
);
}
}
if
(
bAddComma
==
1
)
{
ASN__CALLBACK
(
","
,
1
);
bAddComma
=
0
;
}
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
);
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
);
ASN__CALLBACK3
(
"
{
\n\"
"
,
3
,
mname
,
mlen
,
"
\"
: "
,
3
);
ASN__CALLBACK3
(
"
\"
"
,
1
,
mname
,
mlen
,
"
\"
: "
,
3
);
/* Print the member itself */
/* Print the member itself */
tmper
=
elm
->
type
->
op
->
jer_encoder
(
elm
->
type
,
memb_ptr
,
ilevel
+
1
,
tmper
=
elm
->
type
->
op
->
jer_encoder
(
elm
->
type
,
memb_ptr
,
ilevel
+
1
,
...
@@ -62,9 +69,11 @@ asn_enc_rval_t SEQUENCE_encode_jer(const asn_TYPE_descriptor_t *td, const void *
...
@@ -62,9 +69,11 @@ asn_enc_rval_t SEQUENCE_encode_jer(const asn_TYPE_descriptor_t *td, const void *
}
}
if
(
tmper
.
encoded
==
-
1
)
return
tmper
;
if
(
tmper
.
encoded
==
-
1
)
return
tmper
;
er
.
encoded
+=
tmper
.
encoded
;
er
.
encoded
+=
tmper
.
encoded
;
if
(
edx
!=
td
->
elements_count
-
1
)
{
bAddComma
=
1
;
}
}
}
ASN__CALLBACK
(
"}
,"
,
2
);
ASN__CALLBACK
(
"}
"
,
1
);
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
-
1
);
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
-
1
);
...
...
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