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
e5a87729
Commit
e5a87729
authored
Jan 15, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for processing NFStatus Notification
parent
2534b061
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
src/api-server/impl/NFStatusNotifyApiImpl.cpp
src/api-server/impl/NFStatusNotifyApiImpl.cpp
+1
-1
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+10
-7
No files found.
src/api-server/impl/NFStatusNotifyApiImpl.cpp
View file @
e5a87729
...
...
@@ -48,7 +48,7 @@ void NFStatusNotifyApiImpl::receive_nf_status_notification(
p
=
std
::
make_shared
<
smf
::
upf_profile
>
();
nlohmann
::
json
pj
=
{};
to_json
(
pj
,
notificationData
);
to_json
(
pj
,
notificationData
.
getNfProfile
()
);
p
.
get
()
->
from_json
(
pj
);
notification_msg
.
set_profile
(
p
);
...
...
src/smf_app/smf_app.cpp
View file @
e5a87729
...
...
@@ -1221,7 +1221,7 @@ bool smf_app::handle_nf_status_notification(
data_notification_msg
notification_msg
=
msg
.
get
()
->
notification_msg
;
std
::
string
event_type
;
notification_msg
.
get_notification_event_type
(
event_type
);
if
(
event_type
.
compare
(
"REGISTERED"
)
==
0
)
{
if
(
event_type
.
compare
(
"
NF_
REGISTERED"
)
==
0
)
{
std
::
shared_ptr
<
nf_profile
>
profile
=
{};
notification_msg
.
get_profile
(
profile
);
if
(
profile
.
get
()
!=
nullptr
)
{
...
...
@@ -1259,6 +1259,9 @@ bool smf_app::handle_nf_status_notification(
}
else
{
return
false
;
}
}
else
{
Logger
::
smf_app
().
debug
(
"This event (%s) has not been supported yet!"
,
event_type
);
}
return
true
;
...
...
@@ -1954,10 +1957,10 @@ void smf_app::trigger_upf_status_notification_subscribe() {
TASK_SMF_APP
,
TASK_SMF_N11
);
nlohmann
::
json
json_data
=
{};
//TODO: remove hardcoded values
//
TODO: remove hardcoded values
json_data
[
"nfStatusNotificationUri"
]
=
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
smf_cfg
.
sbi
.
addr4
)))
+
":"
+
std
::
to_string
(
smf_cfg
.
sbi
.
port
)
+
"/nsmf-nfstatus-notify/"
+
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
smf_cfg
.
sbi
.
addr4
)))
+
":"
+
std
::
to_string
(
smf_cfg
.
sbi
.
port
)
+
"/nsmf-nfstatus-notify/"
+
smf_cfg
.
sbi_api_version
+
"/subscriptions"
;
json_data
[
"subscrCond"
][
"NfTypeCond"
][
"nfType"
]
=
"UPF"
;
...
...
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