Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
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
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-SMF
Commits
e048e90e
Commit
e048e90e
authored
Mar 15, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix supi format w/wo prefix
parent
67635041
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
src/common/smf.h
src/common/smf.h
+11
-0
src/common/utils/3gpp_conversions.cpp
src/common/utils/3gpp_conversions.cpp
+9
-2
No files found.
src/common/smf.h
View file @
e048e90e
...
...
@@ -60,6 +60,17 @@ static std::string smf_supi_to_string(supi_t const supi) {
return
supi_str
;
}
static
std
::
string
smf_get_supi_with_prefix
(
const
std
::
string
&
prefix
,
const
std
::
string
&
supi
)
{
std
::
string
supi_str
=
{};
if
(
!
prefix
.
empty
())
{
supi_str
=
prefix
+
"-"
+
supi
;
}
else
{
supi_str
=
supi
;
}
return
supi_str
;
}
// TODO should we just replace the other function? Because this null chars are
// annoying
static
std
::
string
smf_supi_to_string_without_nulls
(
supi_t
const
supi
)
{
...
...
src/common/utils/3gpp_conversions.cpp
View file @
e048e90e
...
...
@@ -184,9 +184,16 @@ void xgpp_conv::sm_context_create_from_openapi(
if
(
context_data
.
supiIsSet
())
{
// supi
supi_t
supi
=
{.
length
=
0
};
std
::
string
supi_str
=
{};
std
::
string
supi_prefix
=
{};
std
::
size_t
pos
=
context_data
.
getSupi
().
find
(
"-"
);
std
::
string
supi_str
=
context_data
.
getSupi
().
substr
(
pos
+
1
);
std
::
string
supi_prefix
=
context_data
.
getSupi
().
substr
(
0
,
pos
);
if
(
pos
!=
std
::
string
::
npos
)
{
supi_str
=
context_data
.
getSupi
().
substr
(
pos
+
1
);
supi_prefix
=
context_data
.
getSupi
().
substr
(
0
,
pos
);
}
else
{
supi_str
=
context_data
.
getSupi
();
}
smf_string_to_supi
(
&
supi
,
supi_str
.
c_str
());
pcr
.
set_supi
(
supi
);
pcr
.
set_supi_prefix
(
supi_prefix
);
...
...
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