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
92d197a1
Commit
92d197a1
authored
Dec 08, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for SUPI conversion
parent
82c68b3b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
src/common/smf.h
src/common/smf.h
+8
-0
src/smf_app/smf_sbi.cpp
src/smf_app/smf_sbi.cpp
+2
-1
No files found.
src/common/smf.h
View file @
92d197a1
...
...
@@ -46,6 +46,7 @@ typedef struct {
char
data
[
SUPI_DIGITS_MAX
+
1
];
}
supi_t
;
// TODO: Move to conversions
static
void
smf_string_to_supi
(
supi_t
*
const
supi
,
char
const
*
const
supi_str
)
{
// strncpy(supi->data, supi_str, SUPI_DIGITS_MAX + 1);
memcpy
((
void
*
)
supi
->
data
,
(
void
*
)
supi_str
,
SUPI_DIGITS_MAX
+
1
);
...
...
@@ -77,6 +78,13 @@ static uint64_t smf_supi_to_u64(supi_t supi) {
return
uint_supi
;
}
static
std
::
string
smf_supi64_to_string
(
const
supi64_t
&
supi
)
{
std
::
string
supi_str
=
std
::
to_string
(
supi
);
uint8_t
padded_len
=
SUPI_DIGITS_MAX
-
supi_str
.
length
();
for
(
int
i
=
0
;
i
<
padded_len
;
i
++
)
supi_str
=
"0"
+
supi_str
;
return
supi_str
;
}
typedef
struct
s_nssai
// section 28.4, TS23.003
{
const
uint8_t
HASH_SEED
=
17
;
...
...
src/smf_app/smf_sbi.cpp
View file @
92d197a1
...
...
@@ -859,7 +859,8 @@ bool smf_sbi::get_sm_data(
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
smf_cfg
.
udm_addr
.
ipv4_addr
)))
+
":"
+
std
::
to_string
(
smf_cfg
.
udm_addr
.
port
)
+
NUDM_SDM_BASE
+
smf_cfg
.
udm_addr
.
api_version
+
fmt
::
format
(
NUDM_SDM_GET_SM_DATA_URL
,
std
::
to_string
(
supi
))
+
query_str
;
fmt
::
format
(
NUDM_SDM_GET_SM_DATA_URL
,
smf_supi64_to_string
(
supi
))
+
query_str
;
Logger
::
smf_sbi
().
debug
(
"UDM's URL: %s "
,
url
.
c_str
());
...
...
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