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
0244c541
Commit
0244c541
authored
May 26, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup for ITTI
parent
adbd592f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
89 deletions
+1
-89
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+0
-74
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+1
-15
No files found.
src/smf_app/smf_app.cpp
View file @
0244c541
...
...
@@ -1757,10 +1757,6 @@ void smf_app::trigger_create_context_error_response(
refToBinaryData
.
setContentId
(
N1_SM_CONTENT_ID
);
sm_context
.
setN1SmMsg
(
refToBinaryData
);
/* std::shared_ptr<itti_n11_create_sm_context_response> itti_msg =
std::make_shared<itti_n11_create_sm_context_response>(
TASK_SMF_SBI, TASK_SMF_APP, promise_id);
*/
pdu_session_create_sm_context_response
sm_context_response
=
{};
nlohmann
::
json
json_data
=
{};
to_json
(
json_data
,
sm_context
);
...
...
@@ -1769,14 +1765,6 @@ void smf_app::trigger_create_context_error_response(
sm_context_response
.
set_n1_sm_message
(
n1_sm_msg
);
sm_context_response
.
set_http_code
(
http_code
);
trigger_session_create_sm_context_response
(
sm_context_response
,
promise_id
);
/*itti_msg->res = sm_context_response;
int ret = itti_inst->send_msg(itti_msg);
if (RETURNok != ret) {
Logger::smf_app().error(
"Could not send ITTI message %s to task TASK_SMF_APP",
itti_msg->get_msg_name());
}*/
}
//---------------------------------------------------------------------------------------------
...
...
@@ -1790,10 +1778,6 @@ void smf_app::trigger_update_context_error_response(
problem_details
.
setCause
(
pdu_session_application_error_e2str
.
at
(
cause
));
smContextUpdateError
.
setError
(
problem_details
);
/*std::shared_ptr<itti_n11_update_sm_context_response> itti_msg =
std::make_shared<itti_n11_update_sm_context_response>(
TASK_SMF_SBI, TASK_SMF_APP, promise_id);
*/
pdu_session_update_sm_context_response
sm_context_response
=
{};
nlohmann
::
json
json_data
=
{};
to_json
(
json_data
,
smContextUpdateError
);
...
...
@@ -1801,14 +1785,6 @@ void smf_app::trigger_update_context_error_response(
sm_context_response
.
set_json_format
(
"application/problem+json"
);
sm_context_response
.
set_http_code
(
http_code
);
trigger_session_update_sm_context_response
(
sm_context_response
,
promise_id
);
/*itti_msg->res = sm_context_response;
int ret = itti_inst->send_msg(itti_msg);
if (RETURNok != ret) {
Logger::smf_app().error(
"Could not send ITTI message %s to task TASK_SMF_APP",
itti_msg->get_msg_name());
}*/
}
//---------------------------------------------------------------------------------------------
...
...
@@ -1823,10 +1799,6 @@ void smf_app::trigger_update_context_error_response(
problem_details
.
setCause
(
pdu_session_application_error_e2str
.
at
(
cause
));
smContextUpdateError
.
setError
(
problem_details
);
/* std::shared_ptr<itti_n11_update_sm_context_response> itti_msg =
std::make_shared<itti_n11_update_sm_context_response>(
TASK_SMF_SBI, TASK_SMF_APP, promise_id);
*/
pdu_session_update_sm_context_response
sm_context_response
=
{};
nlohmann
::
json
json_data
=
{};
to_json
(
json_data
,
smContextUpdateError
);
...
...
@@ -1835,14 +1807,6 @@ void smf_app::trigger_update_context_error_response(
sm_context_response
.
set_n1_sm_message
(
n1_sm_msg
);
sm_context_response
.
set_http_code
(
http_code
);
trigger_session_update_sm_context_response
(
sm_context_response
,
promise_id
);
/*itti_msg->res = sm_context_response;
int ret = itti_inst->send_msg(itti_msg);
if (RETURNok != ret) {
Logger::smf_app().error(
"Could not send ITTI message %s to task TASK_SMF_APP",
itti_msg->get_msg_name());
}*/
}
//---------------------------------------------------------------------------------------------
...
...
@@ -1852,66 +1816,28 @@ void smf_app::trigger_http_response(
"Send ITTI msg to SMF APP to trigger the response of HTTP Server"
);
switch
(
msg_type
)
{
case
N11_SESSION_RELEASE_SM_CONTEXT_RESPONSE
:
{
/*std::shared_ptr<itti_n11_release_sm_context_response> itti_msg =
std::make_shared<itti_n11_release_sm_context_response>(
TASK_SMF_SBI, TASK_SMF_APP, promise_id);
*/
pdu_session_release_sm_context_response
sm_context_response
=
{};
sm_context_response
.
set_http_code
(
http_code
);
trigger_session_release_sm_context_response
(
sm_context_response
,
promise_id
);
/*
itti_msg->res = sm_context_response;
int ret = itti_inst->send_msg(itti_msg);
if (RETURNok != ret) {
Logger::smf_app().error(
"Could not send ITTI message %s to task TASK_SMF_APP",
itti_msg->get_msg_name());
}*/
}
break
;
case
N11_SESSION_CREATE_SM_CONTEXT_RESPONSE
:
{
/* std::shared_ptr<itti_n11_create_sm_context_response> itti_msg =
std::make_shared<itti_n11_create_sm_context_response>(
TASK_SMF_SBI, TASK_SMF_APP, promise_id);
*/
pdu_session_create_sm_context_response
sm_context_response
=
{};
sm_context_response
.
set_http_code
(
http_code
);
trigger_session_create_sm_context_response
(
sm_context_response
,
promise_id
);
/*
itti_msg->res = sm_context_response;
int ret = itti_inst->send_msg(itti_msg);
if (RETURNok != ret) {
Logger::smf_app().error(
"Could not send ITTI message %s to task TASK_SMF_APP",
itti_msg->get_msg_name());
}*/
}
break
;
case
N11_SESSION_UPDATE_SM_CONTEXT_RESPONSE
:
{
/* std::shared_ptr<itti_n11_update_sm_context_response> itti_msg =
std::make_shared<itti_n11_update_sm_context_response>(
TASK_SMF_SBI, TASK_SMF_APP, promise_id);
*/
pdu_session_update_sm_context_response
sm_context_response
=
{};
sm_context_response
.
set_http_code
(
http_code
);
trigger_session_update_sm_context_response
(
sm_context_response
,
promise_id
);
/* itti_msg->res = sm_context_response;
int ret = itti_inst->send_msg(itti_msg);
if (RETURNok != ret) {
Logger::smf_app().error(
"Could not send ITTI message %s to task TASK_SMF_APP",
itti_msg->get_msg_name());
}*/
}
break
;
default:
{
...
...
src/smf_app/smf_context.cpp
View file @
0244c541
...
...
@@ -1520,10 +1520,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
// 5, 4.3.2.2.1 TS 23.502)
Logger
::
smf_app
().
debug
(
"Send ITTI msg to SMF APP to trigger the response of Server"
);
/* std::shared_ptr<itti_n11_create_sm_context_response> itti_msg =
std::make_shared<itti_n11_create_sm_context_response>(
TASK_SMF_SBI, TASK_SMF_APP, smreq->pid);
*/
pdu_session_create_sm_context_response
sm_context_response
=
{};
std
::
string
smContextRef
=
std
::
to_string
(
smreq
->
scid
);
// headers: Location: contains the URI of the newly created resource,
...
...
@@ -1544,17 +1541,6 @@ void smf_context::handle_pdu_session_create_sm_context_request(
smf_app_inst
->
trigger_session_create_sm_context_response
(
sm_context_response
,
smreq
->
pid
);
/*
itti_msg->res = sm_context_response;
int ret = itti_inst->send_msg(itti_msg);
if (RETURNok != ret) {
Logger::smf_app().error(
"Could not send ITTI message %s to task TASK_SMF_APP",
itti_msg->get_msg_name());
}
*/
// TODO: PDU Session authentication/authorization (Optional)
// see section 4.3.2.3@3GPP TS 23.502 and section 6.3.1@3GPP TS 24.501
...
...
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