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
889ce79c
Commit
889ce79c
authored
Dec 01, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix HTTP response handling
parent
936566db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+10
-6
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+12
-16
No files found.
src/smf_app/smf_app.cpp
View file @
889ce79c
...
...
@@ -735,24 +735,28 @@ void smf_app::handle_itti_msg(itti_n11_create_sm_context_response& m) {
Logger
::
smf_app
().
debug
(
"PDU Session Create SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
trigger_http_response
(
m
.
res
.
get_http_code
(),
m
.
pid
,
N11_SESSION_CREATE_SM_CONTEXT_RESPONSE
);
nlohmann
::
json
response_message_json
=
{};
m
.
res
.
to_json
(
response_message_json
);
trigger_http_response
(
response_message_json
,
m
.
pid
);
}
//------------------------------------------------------------------------------
void
smf_app
::
handle_itti_msg
(
itti_n11_update_sm_context_response
&
m
)
{
Logger
::
smf_app
().
debug
(
"PDU Session Update SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
trigger_http_response
(
m
.
res
.
get_http_code
(),
m
.
pid
,
N11_SESSION_UPDATE_SM_CONTEXT_RESPONSE
);
nlohmann
::
json
response_message_json
=
{};
m
.
res
.
to_json
(
response_message_json
);
trigger_http_response
(
response_message_json
,
m
.
pid
);
}
//------------------------------------------------------------------------------
void
smf_app
::
handle_itti_msg
(
itti_n11_release_sm_context_response
&
m
)
{
Logger
::
smf_app
().
debug
(
"PDU Session Release SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
trigger_http_response
(
m
.
res
.
get_http_code
(),
m
.
pid
,
N11_SESSION_RELEASE_SM_CONTEXT_RESPONSE
);
nlohmann
::
json
response_message_json
=
{};
m
.
res
.
to_json
(
response_message_json
);
trigger_http_response
(
response_message_json
,
m
.
pid
);
}
//------------------------------------------------------------------------------
...
...
src/smf_app/smf_context.cpp
View file @
889ce79c
...
...
@@ -5420,29 +5420,25 @@ void smf_context::send_pdu_session_release_response(
sps
->
timer_T3592
=
itti_inst
->
timer_setup
(
T3592_TIMER_VALUE_SEC
,
0
,
TASK_SMF_APP
,
TASK_SMF_APP_TRIGGER_T3592
,
scid
);
// Trigger response to AMF
nlohmann
::
json
response_message_json
=
{};
resp
->
res
.
to_json
(
response_message_json
);
smf_app_inst
->
trigger_http_response
(
response_message_json
,
resp
->
pid
,
N11_SESSION_RELEASE_SM_CONTEXT_RESPONSE
);
}
break
;
default:
{
smf_app_inst
->
trigger_http_response
(
http_status_code_e
::
HTTP_STATUS_CODE_204_NO_CONTENT
,
resp
->
pid
,
N11_SESSION_RELEASE_SM_CONTEXT_RESPONSE
);
resp
->
res
.
set_http_code
(
http_status_code_e
::
HTTP_STATUS_CODE_204_NO_CONTENT
);
}
}
}
else
{
resp
->
res
.
set_http_code
(
http_status_code_e
::
HTTP_STATUS_CODE_406_NOT_ACCEPTABLE
);
// Trigger response to AMF
nlohmann
::
json
response_message_json
=
{};
resp
->
res
.
to_json
(
response_message_json
);
smf_app_inst
->
trigger_http_response
(
response_message_json
,
resp
->
pid
,
N11_SESSION_RELEASE_SM_CONTEXT_RESPONSE
);
}
// send ITTI message to SMF_APP interface to trigger the response towards AMFs
Logger
::
smf_app
().
info
(
"Sending ITTI message %s to task TASK_SMF_APP"
,
resp
->
get_msg_name
());
int
ret
=
itti_inst
->
send_msg
(
resp
);
if
(
RETURNok
!=
ret
)
{
Logger
::
smf_app
().
error
(
"Could not send ITTI message %s to task TASK_SMF_APP"
,
resp
->
get_msg_name
());
}
}
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