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
7e5ea1d0
Commit
7e5ea1d0
authored
Aug 06, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow specifying PDU even if -pdu=auto was not given
parent
6bd4b296
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
skeletons/converter-sample.c
skeletons/converter-sample.c
+14
-1
No files found.
skeletons/converter-sample.c
View file @
7e5ea1d0
...
...
@@ -108,7 +108,7 @@ main(int ac, char *av[]) {
if
(
optarg
[
0
]
==
'b'
)
{
iform
=
INP_BER
;
break
;
}
if
(
optarg
[
0
]
==
'x'
)
{
iform
=
INP_XER
;
break
;
}
if
(
pduType
->
oer_decoder
&&
optarg
[
0
]
==
'
p
'
)
{
iform
=
INP_OER
;
break
;
}
&&
optarg
[
0
]
==
'
o
'
)
{
iform
=
INP_OER
;
break
;
}
if
(
pduType
->
uper_decoder
&&
optarg
[
0
]
==
'p'
)
{
iform
=
INP_PER
;
break
;
}
fprintf
(
stderr
,
"-i<format>: '%s': improper format selector
\n
"
,
...
...
@@ -169,6 +169,19 @@ main(int ac, char *av[]) {
while
(
*
pdu
&&
strcmp
((
*
pdu
)
->
name
,
optarg
))
pdu
++
;
if
(
*
pdu
)
{
pduType
=
*
pdu
;
break
;
}
fprintf
(
stderr
,
"-p %s: Unrecognized PDU
\n
"
,
optarg
);
exit
(
EX_USAGE
);
}
#else
/* Without -pdu=auto there's just a single type */
if
(
strcmp
(
optarg
,
"list"
)
==
0
)
{
fprintf
(
stderr
,
"Available PDU types:
\n
"
);
printf
(
"%s
\n
"
,
pduType
->
name
);
exit
(
0
);
}
else
if
(
optarg
[
0
]
>=
'A'
&&
optarg
[
0
]
<=
'Z'
)
{
if
(
strcmp
(
optarg
,
pduType
->
name
)
==
0
)
{
break
;
}
fprintf
(
stderr
,
"-p %s: Unrecognized PDU
\n
"
,
optarg
);
exit
(
EX_USAGE
);
}
#endif
/* ASN_PDU_COLLECTION */
fprintf
(
stderr
,
"-p %s: Unrecognized option
\n
"
,
optarg
);
...
...
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