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
adbd592f
Commit
adbd592f
authored
May 23, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary ITTI to send HTTP response
parent
7b7ea0b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
17 deletions
+32
-17
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+22
-13
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+10
-4
No files found.
src/smf_app/smf_app.cpp
View file @
adbd592f
...
...
@@ -1757,9 +1757,10 @@ 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
);
/* 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
);
...
...
@@ -1767,13 +1768,15 @@ void smf_app::trigger_create_context_error_response(
sm_context_response
.
set_json_format
(
"application/problem+json"
);
sm_context_response
.
set_n1_sm_message
(
n1_sm_msg
);
sm_context_response
.
set_http_code
(
http_code
);
itti_msg
->
res
=
sm_context_response
;
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());
}
}
*/
}
//---------------------------------------------------------------------------------------------
...
...
@@ -1787,22 +1790,25 @@ 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::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
);
sm_context_response
.
set_json_data
(
json_data
);
sm_context_response
.
set_json_format
(
"application/problem+json"
);
sm_context_response
.
set_http_code
(
http_code
);
itti_msg
->
res
=
sm_context_response
;
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());
}
}
*/
}
//---------------------------------------------------------------------------------------------
...
...
@@ -1817,9 +1823,10 @@ 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
);
/* 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
);
...
...
@@ -1827,13 +1834,15 @@ void smf_app::trigger_update_context_error_response(
sm_context_response
.
set_json_format
(
"application/problem+json"
);
sm_context_response
.
set_n1_sm_message
(
n1_sm_msg
);
sm_context_response
.
set_http_code
(
http_code
);
itti_msg
->
res
=
sm_context_response
;
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());
}
}
*/
}
//---------------------------------------------------------------------------------------------
...
...
src/smf_app/smf_context.cpp
View file @
adbd592f
...
...
@@ -1520,10 +1520,10 @@ 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
);
/*
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,
...
...
@@ -1540,6 +1540,11 @@ void smf_context::handle_pdu_session_create_sm_context_request(
sm_context_response
.
set_json_data
(
json_data
);
sm_context_response
.
set_http_code
(
http_status_code_e
::
HTTP_STATUS_CODE_201_CREATED
);
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);
...
...
@@ -1548,6 +1553,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
"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