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
90ca2e36
Commit
90ca2e36
authored
Jan 03, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix length of PayloadContainer
parent
e046c042
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
src/nas/ies/Payload_Container.cpp
src/nas/ies/Payload_Container.cpp
+4
-7
No files found.
src/nas/ies/Payload_Container.cpp
View file @
90ca2e36
...
@@ -39,7 +39,7 @@ Payload_Container::Payload_Container(uint8_t iei, bstring b) {
...
@@ -39,7 +39,7 @@ Payload_Container::Payload_Container(uint8_t iei, bstring b) {
_iei
=
iei
;
_iei
=
iei
;
content
=
std
::
optional
<
bstring
>
(
b
);
content
=
std
::
optional
<
bstring
>
(
b
);
CONTENT
=
std
::
nullopt
;
CONTENT
=
std
::
nullopt
;
length
=
1
+
blength
(
b
);
length
=
blength
(
b
);
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
@@ -48,15 +48,12 @@ Payload_Container::Payload_Container(
...
@@ -48,15 +48,12 @@ Payload_Container::Payload_Container(
_iei
=
iei
;
_iei
=
iei
;
content
=
std
::
nullopt
;
content
=
std
::
nullopt
;
if
(
_iei
)
{
length
=
1
;
// for number of entries
length
=
4
;
// 1 for IEI, 2 for length, 1 for number of entries
}
else
{
length
=
3
;
// 2 for length, 1 for number of entries
}
// CONTENT.assign(content.begin(), content.end());
// CONTENT.assign(content.begin(), content.end());
CONTENT
=
std
::
optional
<
std
::
vector
<
PayloadContainerEntry
>>
(
contents
);
CONTENT
=
std
::
optional
<
std
::
vector
<
PayloadContainerEntry
>>
(
contents
);
for
(
int
i
=
0
;
i
<
contents
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
contents
.
size
();
i
++
)
{
length
=
length
+
1
+
contents
.
at
(
i
).
length
;
length
=
length
+
2
+
contents
.
at
(
i
).
length
;
// 2 for Length of Payload container entry
}
}
}
}
...
...
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