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
ce381e8b
Commit
ce381e8b
authored
Jun 19, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for PDU Session Release
parent
f8e7915c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
src/api-server/impl/IndividualSMContextApiImpl.cpp
src/api-server/impl/IndividualSMContextApiImpl.cpp
+4
-1
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+1
-0
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+5
-2
No files found.
src/api-server/impl/IndividualSMContextApiImpl.cpp
View file @
ce381e8b
...
@@ -220,10 +220,13 @@ void IndividualSMContextApiImpl::update_sm_context(
...
@@ -220,10 +220,13 @@ void IndividualSMContextApiImpl::update_sm_context(
response
.
headers
().
add
<
Pistache
::
Http
::
Header
::
ContentType
>
(
response
.
headers
().
add
<
Pistache
::
Http
::
Header
::
ContentType
>
(
Pistache
::
Http
::
Mime
::
MediaType
(
Pistache
::
Http
::
Mime
::
MediaType
(
"multipart/related; boundary="
+
std
::
string
(
CURL_MIME_BOUNDARY
)));
"multipart/related; boundary="
+
std
::
string
(
CURL_MIME_BOUNDARY
)));
}
else
{
}
else
if
(
json_data
.
size
()
>
0
)
{
response
.
headers
().
add
<
Pistache
::
Http
::
Header
::
ContentType
>
(
response
.
headers
().
add
<
Pistache
::
Http
::
Header
::
ContentType
>
(
Pistache
::
Http
::
Mime
::
MediaType
(
"application/json"
));
Pistache
::
Http
::
Mime
::
MediaType
(
"application/json"
));
body
=
json_data
.
dump
().
c_str
();
body
=
json_data
.
dump
().
c_str
();
}
else
{
response
.
send
(
Pistache
::
Http
::
Code
(
sm_context_response
.
get_http_code
()));
return
;
}
}
response
.
send
(
Pistache
::
Http
::
Code
(
sm_context_response
.
get_http_code
()),
response
.
send
(
Pistache
::
Http
::
Code
(
sm_context_response
.
get_http_code
()),
...
...
src/smf_app/smf_app.cpp
View file @
ce381e8b
...
@@ -777,6 +777,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
...
@@ -777,6 +777,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
//Step 4. Verify the session is already existed
//Step 4. Verify the session is already existed
if
(
is_scid_2_smf_context
(
supi64
,
dnn
,
snssai
,
pdu_session_id
))
{
if
(
is_scid_2_smf_context
(
supi64
,
dnn
,
snssai
,
pdu_session_id
))
{
//TODO: should delete the local context (including and any associated resources in the UPF and PCF) and create a new one
Logger
::
smf_app
().
warn
(
Logger
::
smf_app
().
warn
(
"PDU Session already existed (SUPI "
SUPI_64_FMT
", DNN %s, NSSAI (sst %d, sd %s), PDU Session ID %d)"
,
"PDU Session already existed (SUPI "
SUPI_64_FMT
", DNN %s, NSSAI (sst %d, sd %s), PDU Session ID %d)"
,
supi64
,
dnn
.
c_str
(),
snssai
.
sST
,
snssai
.
sD
.
c_str
(),
pdu_session_id
);
supi64
,
dnn
.
c_str
(),
snssai
.
sST
,
snssai
.
sD
.
c_str
(),
pdu_session_id
);
...
...
src/smf_app/smf_context.cpp
View file @
ce381e8b
...
@@ -1220,14 +1220,14 @@ void smf_context::handle_pdu_session_create_sm_context_request(
...
@@ -1220,14 +1220,14 @@ void smf_context::handle_pdu_session_create_sm_context_request(
bool
find_pdu
=
sd
.
get
()
->
find_pdu_session
(
pdu_session_id
,
sp
);
bool
find_pdu
=
sd
.
get
()
->
find_pdu_session
(
pdu_session_id
,
sp
);
if
(
nullptr
==
sp
.
get
())
{
if
(
nullptr
==
sp
.
get
())
{
Logger
::
smf_app
().
debug
(
"Create a new PD
N connect
ion"
);
Logger
::
smf_app
().
debug
(
"Create a new PD
U sess
ion"
);
sp
=
std
::
shared_ptr
<
smf_pdu_session
>
(
new
smf_pdu_session
());
sp
=
std
::
shared_ptr
<
smf_pdu_session
>
(
new
smf_pdu_session
());
sp
.
get
()
->
pdn_type
.
pdn_type
=
smreq
->
req
.
get_pdu_session_type
();
sp
.
get
()
->
pdn_type
.
pdn_type
=
smreq
->
req
.
get_pdu_session_type
();
sp
.
get
()
->
pdu_session_id
=
pdu_session_id
;
sp
.
get
()
->
pdu_session_id
=
pdu_session_id
;
sp
.
get
()
->
amf_id
=
smreq
->
req
.
get_serving_nf_id
();
//amf id
sp
.
get
()
->
amf_id
=
smreq
->
req
.
get_serving_nf_id
();
//amf id
sd
->
insert_pdu_session
(
sp
);
sd
->
insert_pdu_session
(
sp
);
}
else
{
}
else
{
Logger
::
smf_app
().
debug
(
"PD
N connect
ion is already existed!"
);
Logger
::
smf_app
().
debug
(
"PD
U sess
ion is already existed!"
);
//trigger to send reply to AMF
//trigger to send reply to AMF
smf_app_inst
->
trigger_http_response
(
smf_app_inst
->
trigger_http_response
(
http_status_code_e
::
HTTP_STATUS_CODE_406_NOT_ACCEPTABLE
,
smreq
->
pid
,
http_status_code_e
::
HTTP_STATUS_CODE_406_NOT_ACCEPTABLE
,
smreq
->
pid
,
...
@@ -2317,6 +2317,9 @@ void smf_context::handle_pdu_session_update_sm_context_request(
...
@@ -2317,6 +2317,9 @@ void smf_context::handle_pdu_session_update_sm_context_request(
sm_context_resp_pending
->
session_procedure_type
=
procedure_type
;
sm_context_resp_pending
->
session_procedure_type
=
procedure_type
;
//don't need to create a procedure to update UPF
//don't need to create a procedure to update UPF
smf_app_inst
->
trigger_http_response
(
http_status_code_e
::
HTTP_STATUS_CODE_200_OK
,
smreq
->
pid
,
N11_SESSION_UPDATE_SM_CONTEXT_RESPONSE
);
}
}
break
;
break
;
...
...
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