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
f6e168f8
Commit
f6e168f8
authored
Apr 22, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'merged_by_accident' into 'develop'
format smf_context See merge request oai/oai-cn5g-smf!7
parents
050a6842
a11f2afe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
16 deletions
+22
-16
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+22
-16
No files found.
src/smf_app/smf_context.cpp
View file @
f6e168f8
...
...
@@ -880,8 +880,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
sm_context_resp
->
res
.
set_pdu_session_id
(
pdu_session_id
);
sm_context_resp
->
res
.
set_snssai
(
snssai
);
sm_context_resp
->
res
.
set_dnn
(
dnn
);
sm_context_resp
->
res
.
set_pdu_session_type
(
smreq
->
req
.
get_pdu_session_type
());
sm_context_resp
->
res
.
set_pdu_session_type
(
smreq
->
req
.
get_pdu_session_type
());
sm_context_resp
->
res
.
set_pti
(
smreq
->
req
.
get_pti
());
sm_context_resp
->
set_scid
(
smreq
->
scid
);
...
...
@@ -1051,8 +1050,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
// std::string smContextRef = sm_context_req_msg.get_supi_prefix() + "-" + smf_supi_to_string(sm_context_req_msg.get_supi());
std
::
string
smContextRef
=
std
::
to_string
(
smreq
->
scid
);
//headers: Location: contains the URI of the newly created resource, according to the structure: {apiRoot}/nsmf-pdusession/{apiVersion}/sm-contexts/{smContextRef}
std
::
string
uri
=
smreq
->
req
.
get_api_root
()
+
"/"
+
smContextRef
.
c_str
();
std
::
string
uri
=
smreq
->
req
.
get_api_root
()
+
"/"
+
smContextRef
.
c_str
();
sm_context_resp
->
http_response
.
headers
()
.
add
<
Pistache
::
Http
::
Header
::
Location
>
(
uri
);
...
...
@@ -1278,9 +1276,11 @@ void smf_context::handle_pdu_session_update_sm_context_request(
//See section 6.4.2 - UE-requested PDU Session modification procedure@ 3GPP TS 24.501
//PDU Session Identity
//check if the PDU Session Release Command is already sent for this message (see section 6.3.3.5 @3GPP TS 24.501)
if
(
sp
.
get
()
->
get_pdu_session_status
()
==
pdu_session_status_e
::
PDU_SESSION_INACTIVE_PENDING
)
{
if
(
sp
.
get
()
->
get_pdu_session_status
()
==
pdu_session_status_e
::
PDU_SESSION_INACTIVE_PENDING
)
{
//Ignore the message
Logger
::
smf_app
().
info
(
"A PDU Session Release Command has been sent for this session (session ID %d), ignore the message!"
,
Logger
::
smf_app
().
info
(
"A PDU Session Release Command has been sent for this session (session ID %d), ignore the message!"
,
decoded_nas_msg
.
plain
.
sm
.
header
.
pdu_session_identity
);
return
;
}
...
...
@@ -1446,8 +1446,10 @@ void smf_context::handle_pdu_session_update_sm_context_request(
//TODO: PDU Session ID mismatch
}
//Abnormal cases in network side (see section 6.4.3.6 @3GPP TS 24.501)
if
(
sp
.
get
()
->
get_pdu_session_status
()
==
pdu_session_status_e
::
PDU_SESSION_INACTIVE
)
{
Logger
::
smf_app
().
warn
(
"PDU Session status: INACTIVE, send PDU Session Release Reject to UE!"
);
if
(
sp
.
get
()
->
get_pdu_session_status
()
==
pdu_session_status_e
::
PDU_SESSION_INACTIVE
)
{
Logger
::
smf_app
().
warn
(
"PDU Session status: INACTIVE, send PDU Session Release Reject to UE!"
);
problem_details
.
setCause
(
pdu_session_application_error_e2str
[
PDU_SESSION_APPLICATION_ERROR_NETWORK_FAILURE
]);
//TODO: which cause?
smContextUpdateError
.
setError
(
problem_details
);
...
...
@@ -1462,9 +1464,11 @@ void smf_context::handle_pdu_session_update_sm_context_request(
Pistache
::
Http
::
Code
::
Forbidden
,
n1_sm_msg_hex
);
}
//Abnormal cases in network side (see section 6.3.3.5 @3GPP TS 24.501)
if
(
sp
.
get
()
->
get_pdu_session_status
()
==
pdu_session_status_e
::
PDU_SESSION_INACTIVE_PENDING
)
{
if
(
sp
.
get
()
->
get_pdu_session_status
()
==
pdu_session_status_e
::
PDU_SESSION_INACTIVE_PENDING
)
{
//Ignore the message
Logger
::
smf_app
().
info
(
"A PDU Session Release Command has been sent for this session (session ID %d), ignore the message!"
,
Logger
::
smf_app
().
info
(
"A PDU Session Release Command has been sent for this session (session ID %d), ignore the message!"
,
decoded_nas_msg
.
plain
.
sm
.
header
.
pdu_session_identity
);
return
;
}
...
...
@@ -1489,7 +1493,8 @@ void smf_context::handle_pdu_session_update_sm_context_request(
if
((
!
find_dnn_context
(
sm_context_req_msg
.
get_snssai
(),
sm_context_req_msg
.
get_dnn
(),
sd
))
or
(
nullptr
==
sd
.
get
()))
{
Logger
::
smf_app
().
warn
(
"Could not find the context for this PDU session"
);
Logger
::
smf_app
().
warn
(
"Could not find the context for this PDU session"
);
//create PDU Session Release Reject and send to UE
problem_details
.
setCause
(
pdu_session_application_error_e2str
[
PDU_SESSION_APPLICATION_ERROR_CONTEXT_NOT_FOUND
]);
...
...
@@ -1511,7 +1516,8 @@ void smf_context::handle_pdu_session_update_sm_context_request(
if
((
!
sd
.
get
()
->
find_pdu_session
(
sm_context_req_msg
.
get_pdu_session_id
(),
ss
))
or
(
nullptr
==
ss
.
get
()))
{
Logger
::
smf_app
().
warn
(
"Could not find the context for this PDU session"
);
Logger
::
smf_app
().
warn
(
"Could not find the context for this PDU session"
);
//create PDU Session Release Reject and send to UE
problem_details
.
setCause
(
pdu_session_application_error_e2str
[
PDU_SESSION_APPLICATION_ERROR_CONTEXT_NOT_FOUND
]);
...
...
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