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
cf84406b
Commit
cf84406b
authored
Dec 08, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for retrieving Session Management Subscription from UDM
parent
86379c99
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
121 additions
and
118 deletions
+121
-118
src/smf_app/smf_sbi.cpp
src/smf_app/smf_sbi.cpp
+121
-118
No files found.
src/smf_app/smf_sbi.cpp
View file @
cf84406b
...
@@ -944,8 +944,8 @@ bool smf_sbi::get_sm_data(
...
@@ -944,8 +944,8 @@ bool smf_sbi::get_sm_data(
for
(
nlohmann
::
json
::
iterator
it
=
jsonData
[
"dnnConfigurations"
].
begin
();
for
(
nlohmann
::
json
::
iterator
it
=
jsonData
[
"dnnConfigurations"
].
begin
();
it
!=
jsonData
[
"dnnConfigurations"
].
end
();
++
it
)
{
it
!=
jsonData
[
"dnnConfigurations"
].
end
();
++
it
)
{
Logger
::
smf_sbi
().
debug
(
"DNN %s"
,
it
.
key
().
c_str
());
Logger
::
smf_sbi
().
debug
(
"DNN %s"
,
it
.
key
().
c_str
());
if
(
it
.
key
().
compare
(
dnn
)
!=
0
)
break
;
if
(
it
.
key
().
compare
(
dnn
)
==
0
)
{
// Get DNN configuration
try
{
try
{
std
::
shared_ptr
<
dnn_configuration_t
>
dnn_configuration
=
std
::
shared_ptr
<
dnn_configuration_t
>
dnn_configuration
=
std
::
make_shared
<
dnn_configuration_t
>
();
std
::
make_shared
<
dnn_configuration_t
>
();
...
@@ -959,7 +959,8 @@ bool smf_sbi::get_sm_data(
...
@@ -959,7 +959,8 @@ bool smf_sbi::get_sm_data(
pdu_session_type
;
pdu_session_type
;
// SSC_Mode (Mandatory)
// SSC_Mode (Mandatory)
std
::
string
default_ssc_mode
=
it
.
value
()[
"sscModes"
][
"defaultSscMode"
];
std
::
string
default_ssc_mode
=
it
.
value
()[
"sscModes"
][
"defaultSscMode"
];
Logger
::
smf_sbi
().
debug
(
Logger
::
smf_sbi
().
debug
(
"Default SSC Mode %s"
,
default_ssc_mode
.
c_str
());
"Default SSC Mode %s"
,
default_ssc_mode
.
c_str
());
ssc_mode_t
ssc_mode
(
default_ssc_mode
);
ssc_mode_t
ssc_mode
(
default_ssc_mode
);
...
@@ -1014,8 +1015,8 @@ bool smf_sbi::get_sm_data(
...
@@ -1014,8 +1015,8 @@ bool smf_sbi::get_sm_data(
std
::
string
ue_ip_str
=
ip_addr
[
"ipv6Addr"
].
get
<
std
::
string
>
();
std
::
string
ue_ip_str
=
ip_addr
[
"ipv6Addr"
].
get
<
std
::
string
>
();
if
(
inet_pton
(
if
(
inet_pton
(
AF_INET6
,
util
::
trim
(
ue_ip_str
).
c_str
(),
buf_in6_addr
)
==
AF_INET6
,
util
::
trim
(
ue_ip_str
).
c_str
(),
1
)
{
buf_in6_addr
)
==
1
)
{
memcpy
(
&
ue_ipv6_addr
,
buf_in6_addr
,
sizeof
(
struct
in6_addr
));
memcpy
(
&
ue_ipv6_addr
,
buf_in6_addr
,
sizeof
(
struct
in6_addr
));
}
else
{
}
else
{
Logger
::
smf_app
().
error
(
Logger
::
smf_app
().
error
(
...
@@ -1029,7 +1030,8 @@ bool smf_sbi::get_sm_data(
...
@@ -1029,7 +1030,8 @@ bool smf_sbi::get_sm_data(
}
else
if
(
ip_addr
.
find
(
"ipv6Prefix"
)
!=
ip_addr
.
end
())
{
}
else
if
(
ip_addr
.
find
(
"ipv6Prefix"
)
!=
ip_addr
.
end
())
{
unsigned
char
buf_in6_addr
[
sizeof
(
struct
in6_addr
)];
unsigned
char
buf_in6_addr
[
sizeof
(
struct
in6_addr
)];
struct
in6_addr
ipv6_prefix
;
struct
in6_addr
ipv6_prefix
;
std
::
string
prefix_str
=
ip_addr
[
"ipv6Prefix"
].
get
<
std
::
string
>
();
std
::
string
prefix_str
=
ip_addr
[
"ipv6Prefix"
].
get
<
std
::
string
>
();
std
::
vector
<
std
::
string
>
words
=
{};
std
::
vector
<
std
::
string
>
words
=
{};
boost
::
split
(
boost
::
split
(
words
,
prefix_str
,
boost
::
is_any_of
(
"/"
),
words
,
prefix_str
,
boost
::
is_any_of
(
"/"
),
...
@@ -1071,6 +1073,7 @@ bool smf_sbi::get_sm_data(
...
@@ -1071,6 +1073,7 @@ bool smf_sbi::get_sm_data(
return
false
;
return
false
;
}
}
}
}
}
return
true
;
return
true
;
}
else
{
}
else
{
return
false
;
return
false
;
...
...
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