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
3fb09c01
Commit
3fb09c01
authored
Jan 05, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for Notify URI
parent
958517d9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
src/amf-app/amf_msg.cpp
src/amf-app/amf_msg.cpp
+11
-1
src/amf-app/amf_msg.hpp
src/amf-app/amf_msg.hpp
+8
-0
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+1
-0
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+1
-2
No files found.
src/amf-app/amf_msg.cpp
View file @
3fb09c01
...
@@ -124,7 +124,8 @@ void event_exposure_msg::set_any_ue(bool value) {
...
@@ -124,7 +124,8 @@ void event_exposure_msg::set_any_ue(bool value) {
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void
event_notification
::
set_notify_correlation_id
(
std
::
string
const
&
value
)
{
void
event_notification
::
set_notify_correlation_id
(
std
::
string
const
&
value
)
{
m_notify_correlation_id
=
value
;
m_notify_correlation_id
=
value
;
m_notify_correlation_is_set
=
true
;
}
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
...
@@ -132,6 +133,15 @@ std::string event_notification::get_notify_correlation_id() const {
...
@@ -132,6 +133,15 @@ std::string event_notification::get_notify_correlation_id() const {
return
m_notify_correlation_id
;
return
m_notify_correlation_id
;
}
}
void
event_notification
::
set_notify_uri
(
std
::
string
const
&
value
)
{
m_notify_uri
=
value
;
m_notify_uri_is_set
=
true
;
}
std
::
string
event_notification
::
get_notify_uri
()
const
{
return
m_notify_uri
;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void
event_notification
::
set_subs_change_notify_correlation_id
(
void
event_notification
::
set_subs_change_notify_correlation_id
(
std
::
string
const
&
value
)
{
std
::
string
const
&
value
)
{
...
...
src/amf-app/amf_msg.hpp
View file @
3fb09c01
...
@@ -87,6 +87,10 @@ class event_notification {
...
@@ -87,6 +87,10 @@ class event_notification {
public:
public:
void
set_notify_correlation_id
(
std
::
string
const
&
value
);
void
set_notify_correlation_id
(
std
::
string
const
&
value
);
std
::
string
get_notify_correlation_id
()
const
;
std
::
string
get_notify_correlation_id
()
const
;
void
set_notify_uri
(
std
::
string
const
&
value
);
std
::
string
get_notify_uri
()
const
;
void
set_subs_change_notify_correlation_id
(
std
::
string
const
&
value
);
void
set_subs_change_notify_correlation_id
(
std
::
string
const
&
value
);
std
::
string
get_subs_change_notify_correlation_id
()
const
;
std
::
string
get_subs_change_notify_correlation_id
()
const
;
void
add_report
(
const
oai
::
amf
::
model
::
AmfEventReport
&
report
);
void
add_report
(
const
oai
::
amf
::
model
::
AmfEventReport
&
report
);
...
@@ -95,6 +99,10 @@ class event_notification {
...
@@ -95,6 +99,10 @@ class event_notification {
private:
private:
std
::
string
m_notify_correlation_id
;
// notifyCorrelationId
std
::
string
m_notify_correlation_id
;
// notifyCorrelationId
bool
m_notify_correlation_is_set
;
bool
m_notify_correlation_is_set
;
std
::
string
m_notify_uri
;
// notifyUri
bool
m_notify_uri_is_set
;
std
::
string
std
::
string
m_subs_change_notify_correlation_id
;
// SubsChangeNotifyCorrelationId;
m_subs_change_notify_correlation_id
;
// SubsChangeNotifyCorrelationId;
bool
m_subs_change_notify_correlation_id_is_set
;
bool
m_subs_change_notify_correlation_id_is_set
;
...
...
src/amf-app/amf_n1.cpp
View file @
3fb09c01
...
@@ -3368,6 +3368,7 @@ void amf_n1::handle_ue_connectivity_state_change(
...
@@ -3368,6 +3368,7 @@ void amf_n1::handle_ue_connectivity_state_change(
for
(
auto
i
:
subscriptions
)
{
for
(
auto
i
:
subscriptions
)
{
event_notification
ev_notif
=
{};
event_notification
ev_notif
=
{};
ev_notif
.
set_notify_correlation_id
(
i
.
get
()
->
notify_correlation_id
);
ev_notif
.
set_notify_correlation_id
(
i
.
get
()
->
notify_correlation_id
);
ev_notif
.
set_notify_uri
(
i
.
get
()
->
notify_uri
);
// Direct subscription
// ev_notif.set_subs_change_notify_correlation_id(i.get()->notify_uri);
// ev_notif.set_subs_change_notify_correlation_id(i.get()->notify_uri);
oai
::
amf
::
model
::
AmfEventReport
event_report
=
{};
oai
::
amf
::
model
::
AmfEventReport
event_report
=
{};
...
...
src/amf-app/amf_n11.cpp
View file @
3fb09c01
...
@@ -564,7 +564,7 @@ void amf_n11::handle_itti_message(itti_sbi_notify_subscribed_event& itti_msg) {
...
@@ -564,7 +564,7 @@ void amf_n11::handle_itti_message(itti_sbi_notify_subscribed_event& itti_msg) {
std
::
string
body
=
json_data
.
dump
();
std
::
string
body
=
json_data
.
dump
();
std
::
string
response_data
;
std
::
string
response_data
;
std
::
string
url
=
i
.
get_notify_
correlation_id
();
std
::
string
url
=
i
.
get_notify_
uri
();
curl_http_client
(
url
,
"POST"
,
body
,
response_data
);
curl_http_client
(
url
,
"POST"
,
body
,
response_data
);
// TODO: process the response
// TODO: process the response
}
}
...
@@ -1358,7 +1358,6 @@ void amf_n11::curl_http_client(
...
@@ -1358,7 +1358,6 @@ void amf_n11::curl_http_client(
std
::
string
remoteUri
,
std
::
string
method
,
std
::
string
msgBody
,
std
::
string
remoteUri
,
std
::
string
method
,
std
::
string
msgBody
,
std
::
string
&
response
,
uint8_t
http_version
)
{
std
::
string
&
response
,
uint8_t
http_version
)
{
Logger
::
amf_n11
().
info
(
"Send HTTP message to %s"
,
remoteUri
.
c_str
());
Logger
::
amf_n11
().
info
(
"Send HTTP message to %s"
,
remoteUri
.
c_str
());
Logger
::
amf_n11
().
info
(
"HTTP message Body: %s"
,
msgBody
.
c_str
());
Logger
::
amf_n11
().
info
(
"HTTP message Body: %s"
,
msgBody
.
c_str
());
uint32_t
str_len
=
msgBody
.
length
();
uint32_t
str_len
=
msgBody
.
length
();
...
...
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