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
3f94d8e0
Commit
3f94d8e0
authored
Mar 17, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue when adding subscription information with the same NSSAI
parent
07852f13
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
2 deletions
+38
-2
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+2
-2
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+24
-0
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+12
-0
No files found.
src/smf_app/smf_app.cpp
View file @
3f94d8e0
...
@@ -957,7 +957,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
...
@@ -957,7 +957,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
"Retrieve Session Management Subscription data from the UDM"
);
"Retrieve Session Management Subscription data from the UDM"
);
if
(
smf_sbi_inst
->
get_sm_data
(
supi64
,
dnn
,
snssai
,
subscription
))
{
if
(
smf_sbi_inst
->
get_sm_data
(
supi64
,
dnn
,
snssai
,
subscription
))
{
// update dnn_context with subscription info
// update dnn_context with subscription info
sc
.
get
()
->
insert_dnn_subscription
(
snssai
,
subscription
);
sc
.
get
()
->
insert_dnn_subscription
(
snssai
,
dnn
,
subscription
);
}
else
{
}
else
{
// Cannot retrieve information from UDM, reject PDU session
// Cannot retrieve information from UDM, reject PDU session
// establishment
// establishment
...
@@ -992,7 +992,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
...
@@ -992,7 +992,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
if
(
get_session_management_subscription_data
(
if
(
get_session_management_subscription_data
(
supi64
,
dnn
,
snssai
,
subscription
))
{
supi64
,
dnn
,
snssai
,
subscription
))
{
// update dnn_context with subscription info
// update dnn_context with subscription info
sc
.
get
()
->
insert_dnn_subscription
(
snssai
,
subscription
);
sc
.
get
()
->
insert_dnn_subscription
(
snssai
,
dnn
,
subscription
);
}
}
}
}
}
}
...
...
src/smf_app/smf_context.cpp
View file @
3f94d8e0
...
@@ -2873,11 +2873,35 @@ void smf_context::insert_dnn_subscription(
...
@@ -2873,11 +2873,35 @@ void smf_context::insert_dnn_subscription(
const
snssai_t
&
snssai
,
const
snssai_t
&
snssai
,
std
::
shared_ptr
<
session_management_subscription
>&
ss
)
{
std
::
shared_ptr
<
session_management_subscription
>&
ss
)
{
std
::
unique_lock
<
std
::
recursive_mutex
>
lock
(
m_context
);
std
::
unique_lock
<
std
::
recursive_mutex
>
lock
(
m_context
);
dnn_subscriptions
[(
uint8_t
)
snssai
.
sST
]
=
ss
;
dnn_subscriptions
[(
uint8_t
)
snssai
.
sST
]
=
ss
;
Logger
::
smf_app
().
info
(
Logger
::
smf_app
().
info
(
"Inserted DNN Subscription, key: %d"
,
(
uint8_t
)
snssai
.
sST
);
"Inserted DNN Subscription, key: %d"
,
(
uint8_t
)
snssai
.
sST
);
}
}
//------------------------------------------------------------------------------
void
smf_context
::
insert_dnn_subscription
(
const
snssai_t
&
snssai
,
const
std
::
string
&
dnn
,
std
::
shared_ptr
<
session_management_subscription
>&
ss
)
{
std
::
unique_lock
<
std
::
recursive_mutex
>
lock
(
m_context
);
if
(
dnn_subscriptions
.
count
((
uint8_t
)
snssai
.
sST
)
>
0
)
{
std
::
shared_ptr
<
session_management_subscription
>
old_ss
=
dnn_subscriptions
.
at
((
uint8_t
)
snssai
.
sST
);
std
::
shared_ptr
<
dnn_configuration_t
>
dnn_configuration
=
{};
ss
.
get
()
->
find_dnn_configuration
(
dnn
,
dnn_configuration
);
if
(
dnn_configuration
!=
nullptr
)
{
old_ss
.
get
()
->
insert_dnn_configuration
(
dnn
,
dnn_configuration
);
}
}
else
{
dnn_subscriptions
[(
uint8_t
)
snssai
.
sST
]
=
ss
;
}
Logger
::
smf_app
().
info
(
"Inserted DNN Subscription, key: %d, dnn %s"
,
(
uint8_t
)
snssai
.
sST
,
dnn
.
c_str
());
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
bool
smf_context
::
is_dnn_snssai_subscription_data
(
bool
smf_context
::
is_dnn_snssai_subscription_data
(
const
std
::
string
&
dnn
,
const
snssai_t
&
snssai
)
{
const
std
::
string
&
dnn
,
const
snssai_t
&
snssai
)
{
...
...
src/smf_app/smf_context.hpp
View file @
3f94d8e0
...
@@ -854,6 +854,18 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
...
@@ -854,6 +854,18 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
const
snssai_t
&
snssai
,
const
snssai_t
&
snssai
,
std
::
shared_ptr
<
session_management_subscription
>&
ss
);
std
::
shared_ptr
<
session_management_subscription
>&
ss
);
/*
* Insert a session management subscription into the SMF context
* @param [const snssai_t&] snssai
* @param [const dnn&] dnn
* @param [std::shared_ptr<session_management_subscription>&] ss: pointer to
* the subscription
* @return void
*/
void
insert_dnn_subscription
(
const
snssai_t
&
snssai
,
const
std
::
string
&
dnn
,
std
::
shared_ptr
<
session_management_subscription
>&
ss
);
/*
/*
* Verify whether a subscription data exist with a given dnn and snssai
* Verify whether a subscription data exist with a given dnn and snssai
* @param [const std::string &] dnn: DNN
* @param [const std::string &] dnn: DNN
...
...
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