Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-AMF
Commits
d46b75a5
Commit
d46b75a5
authored
Mar 14, 2023
by
Giulio Carota
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix conversion from bstring to BIT_STRING_t
parent
98fbae87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/common/conversions.cpp
src/common/conversions.cpp
+6
-6
No files found.
src/common/conversions.cpp
View file @
d46b75a5
...
...
@@ -306,10 +306,10 @@ bool conv::octet_string_2_bit_string(
//------------------------------------------------------------------------------
bool
conv
::
bstring_2_bit_string
(
const
bstring
&
b_str
,
BIT_STRING_t
&
bit_str
)
{
OCTET_STRING_t
octet_str
;
bstring_2_octet_string
(
b_str
,
octet_str
);
octet_string_2_bit_string
(
octet_str
,
bit_str
,
0
);
/*
//
OCTET_STRING_t octet_str;
//
bstring_2_octet_string(b_str, octet_str);
//
octet_string_2_bit_string(octet_str, bit_str, 0);
int
size
=
blength
(
b_str
);
if
(
!
b_str
or
size
<=
0
)
return
false
;
...
...
@@ -318,13 +318,13 @@ bool conv::bstring_2_bit_string(const bstring& b_str, BIT_STRING_t& bit_str) {
bit_str
.
buf
=
(
uint8_t
*
)
calloc
(
size
+
1
,
sizeof
(
uint8_t
));
if
(
!
bit_str
.
buf
)
return
false
;
if (check_bstring (b_str)) memcpy((void*) bit_str.buf, (char*)
octet_str.buf
,
if
(
check_bstring
(
b_str
))
memcpy
((
void
*
)
bit_str
.
buf
,
(
char
*
)
b_str
->
data
,
blength
(
b_str
));
((
uint8_t
*
)
bit_str
.
buf
)[
size
]
=
'\0'
;
bit_str
.
size
=
size
;
bit_str
.
bits_unused
=
0
;
*/
return
true
;
}
...
...
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