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
b223d058
Commit
b223d058
authored
Dec 15, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup for N10/N11
parent
d432fdab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
17 deletions
+2
-17
src/smf_app/smf_n10.cpp
src/smf_app/smf_n10.cpp
+0
-9
src/smf_app/smf_n11.cpp
src/smf_app/smf_n11.cpp
+2
-8
No files found.
src/smf_app/smf_n10.cpp
View file @
b223d058
...
@@ -68,10 +68,6 @@ void smf_n10_task(void *args_p) {
...
@@ -68,10 +68,6 @@ void smf_n10_task(void *args_p) {
auto
*
msg
=
shared_msg
.
get
();
auto
*
msg
=
shared_msg
.
get
();
switch
(
msg
->
msg_type
)
{
switch
(
msg
->
msg_type
)
{
case
N10_SESSION_GET_SESSION_MANAGEMENT_SUBSCRIPTION
:
case
N10_SESSION_GET_SESSION_MANAGEMENT_SUBSCRIPTION
:
// if (itti_n10_get_session_management_subscription* m =
// dynamic_cast<itti_n10_get_session_management_subscription*>(msg)) {
// smf_n10_inst->send_sm_data_get_msg(ref(*m));
//}
break
;
break
;
case
TERMINATE
:
case
TERMINATE
:
...
@@ -104,8 +100,6 @@ bool smf_n10::get_sm_data(
...
@@ -104,8 +100,6 @@ bool smf_n10::get_sm_data(
const
supi64_t
&
supi
,
const
std
::
string
&
dnn
,
const
snssai_t
&
snssai
,
const
supi64_t
&
supi
,
const
std
::
string
&
dnn
,
const
snssai_t
&
snssai
,
std
::
shared_ptr
<
session_management_subscription
>
subscription
)
{
std
::
shared_ptr
<
session_management_subscription
>
subscription
)
{
// retrieve a UE's Session Management Subscription Data
// retrieve a UE's Session Management Subscription Data
// (TS29503_Nudm_SDM.yaml: /{supi}/sm-data) use curl to send data for the
// moment
nlohmann
::
json
jsonData
=
{};
nlohmann
::
json
jsonData
=
{};
curl_global_init
(
CURL_GLOBAL_DEFAULT
);
curl_global_init
(
CURL_GLOBAL_DEFAULT
);
...
@@ -138,7 +132,6 @@ bool smf_n10::get_sm_data(
...
@@ -138,7 +132,6 @@ bool smf_n10::get_sm_data(
// Hook up data handling function.
// Hook up data handling function.
curl_easy_setopt
(
curl
,
CURLOPT_WRITEFUNCTION
,
&
callback
);
curl_easy_setopt
(
curl
,
CURLOPT_WRITEFUNCTION
,
&
callback
);
curl_easy_setopt
(
curl
,
CURLOPT_WRITEDATA
,
httpData
.
get
());
curl_easy_setopt
(
curl
,
CURLOPT_WRITEDATA
,
httpData
.
get
());
// curl_easy_setopt(curl, CURLOPT_WRITEDATA, httpData);
int
numRetries
=
0
;
int
numRetries
=
0
;
while
(
numRetries
<
UDM_NUMBER_RETRIES
)
{
while
(
numRetries
<
UDM_NUMBER_RETRIES
)
{
res
=
curl_easy_perform
(
curl
);
res
=
curl_easy_perform
(
curl
);
...
@@ -151,7 +144,6 @@ bool smf_n10::get_sm_data(
...
@@ -151,7 +144,6 @@ bool smf_n10::get_sm_data(
url
.
c_str
());
url
.
c_str
());
try
{
try
{
jsonData
=
nlohmann
::
json
::
parse
(
*
httpData
.
get
());
jsonData
=
nlohmann
::
json
::
parse
(
*
httpData
.
get
());
// curl_easy_cleanup(curl);
break
;
break
;
}
catch
(
json
::
exception
&
e
)
{
}
catch
(
json
::
exception
&
e
)
{
Logger
::
smf_n10
().
warn
(
"Could not parse json data from UDM"
);
Logger
::
smf_n10
().
warn
(
"Could not parse json data from UDM"
);
...
@@ -178,7 +170,6 @@ bool smf_n10::get_sm_data(
...
@@ -178,7 +170,6 @@ bool smf_n10::get_sm_data(
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
>
();
// PDU Session Type
pdu_session_type_t
pdu_session_type
(
pdu_session_type_t
pdu_session_type
(
pdu_session_type_e
::
PDU_SESSION_TYPE_E_IPV4
);
pdu_session_type_e
::
PDU_SESSION_TYPE_E_IPV4
);
std
::
string
default_session_type
=
std
::
string
default_session_type
=
...
...
src/smf_app/smf_n11.cpp
View file @
b223d058
...
@@ -134,9 +134,6 @@ smf_n11::smf_n11() {
...
@@ -134,9 +134,6 @@ smf_n11::smf_n11() {
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
smf_n11
::
send_n1n2_message_transfer_request
(
void
smf_n11
::
send_n1n2_message_transfer_request
(
std
::
shared_ptr
<
itti_n11_create_sm_context_response
>
sm_context_res
)
{
std
::
shared_ptr
<
itti_n11_create_sm_context_response
>
sm_context_res
)
{
// Transfer N1/N2 message via AMF by using
// N_amf_Communication_N1N2MessageTransfer (see
// TS29518_Namf_Communication.yaml)
Logger
::
smf_n11
().
debug
(
Logger
::
smf_n11
().
debug
(
"Send Communication_N1N2MessageTransfer to AMF (HTTP version %d)"
,
"Send Communication_N1N2MessageTransfer to AMF (HTTP version %d)"
,
sm_context_res
->
http_version
);
sm_context_res
->
http_version
);
...
@@ -256,10 +253,6 @@ void smf_n11::send_n1n2_message_transfer_request(
...
@@ -256,10 +253,6 @@ void smf_n11::send_n1n2_message_transfer_request(
void
smf_n11
::
send_n1n2_message_transfer_request
(
void
smf_n11
::
send_n1n2_message_transfer_request
(
std
::
shared_ptr
<
itti_nx_trigger_pdu_session_modification
>
std
::
shared_ptr
<
itti_nx_trigger_pdu_session_modification
>
sm_session_modification
)
{
sm_session_modification
)
{
// Transfer N1/N2 message via AMF by using
// N_amf_Communication_N1N2MessageTransfer (see
// TS29518_Namf_Communication.yaml)
Logger
::
smf_n11
().
debug
(
"Send Communication_N1N2MessageTransfer to AMF"
);
Logger
::
smf_n11
().
debug
(
"Send Communication_N1N2MessageTransfer to AMF"
);
mime_parser
parser
=
{};
mime_parser
parser
=
{};
...
@@ -531,7 +524,6 @@ void smf_n11::notify_subscribed_event(
...
@@ -531,7 +524,6 @@ void smf_n11::notify_subscribed_event(
std
::
unique_ptr
<
std
::
string
>
httpData
(
new
std
::
string
());
std
::
unique_ptr
<
std
::
string
>
httpData
(
new
std
::
string
());
std
::
string
data
;
std
::
string
data
;
// init curl
curl_global_init
(
CURL_GLOBAL_ALL
);
curl_global_init
(
CURL_GLOBAL_ALL
);
m_curl_multi
=
curl_multi_init
();
m_curl_multi
=
curl_multi_init
();
// init header
// init header
...
@@ -647,3 +639,5 @@ CURL *smf_n11::curl_create_handle(event_notification &ev_notif,
...
@@ -647,3 +639,5 @@ CURL *smf_n11::curl_create_handle(event_notification &ev_notif,
}
}
return
curl
;
return
curl
;
}
}
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