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-Simple
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
CommunityXG
OpenXG-SMF-Simple
Commits
63c7aca6
Commit
63c7aca6
authored
Nov 20, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix for mutex after mege
parent
9c047060
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
src/.clang-format
src/.clang-format
+5
-4
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+0
-3
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+2
-2
No files found.
src/.clang-format
View file @
63c7aca6
...
...
@@ -55,7 +55,7 @@ AlwaysBreakAfterReturnType: None
IndentWrappedFunctionNames: false
# template style
AlwaysBreakTemplateDeclarations: Yes
#
AlwaysBreakTemplateDeclarations: Yes
# preprocessor style
IndentPPDirectives: None
...
...
@@ -79,9 +79,9 @@ UseTab: Never
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeInheritanceColon: true
#
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
#
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
...
...
@@ -92,7 +92,7 @@ SpacesInSquareBrackets: false
# class style
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
#
BreakInheritanceList: BeforeColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
...
...
@@ -115,3 +115,4 @@ SortUsingDeclarations: true
# PenaltyBreakTemplateDeclaration (unsigned)
# PenaltyExcessCharacter (unsigned)
# PenaltyReturnTypeOnItsOwnLine (unsigned)
src/smf_app/smf_context.cpp
View file @
63c7aca6
...
...
@@ -480,7 +480,6 @@ void smf_pdu_session::update_qos_rule(const QOSRulesIE &qos_rule) {
uint8_t
rule_id
=
qos_rule
.
qosruleidentifer
;
if
((
rule_id
>=
QOS_RULE_IDENTIFIER_FIRST
)
and
(
rule_id
<=
QOS_RULE_IDENTIFIER_LAST
))
{
std
::
unique_lock
lock
(
m_pdu_session_mutex
);
if
(
qos_rules
.
count
(
rule_id
)
>
0
)
{
lock
.
lock
();
// Lock it here
qos_rules
.
erase
(
rule_id
);
...
...
@@ -504,7 +503,6 @@ void smf_pdu_session::mark_qos_rule_to_be_synchronised(const uint8_t rule_id) {
std
::
unique_lock
lock
(
m_pdu_session_mutex
,
std
::
defer_lock
);
// Do not lock it first
if
((
rule_id
>=
QOS_RULE_IDENTIFIER_FIRST
)
and
(
rule_id
<=
QOS_RULE_IDENTIFIER_LAST
))
{
std
::
unique_lock
lock
(
m_pdu_session_mutex
);
if
(
qos_rules
.
count
(
rule_id
)
>
0
)
{
lock
.
lock
();
// Lock it here
qos_rules_to_be_synchronised
.
push_back
(
rule_id
);
...
...
@@ -533,7 +531,6 @@ void smf_pdu_session::add_qos_rule(const QOSRulesIE &qos_rule) {
if
((
rule_id
>=
QOS_RULE_IDENTIFIER_FIRST
)
and
(
rule_id
<=
QOS_RULE_IDENTIFIER_LAST
))
{
std
::
unique_lock
lock
(
m_pdu_session_mutex
);
if
(
qos_rules
.
count
(
rule_id
)
>
0
)
{
Logger
::
smf_app
().
error
(
"Failed to add rule (Id %d), rule existed"
,
rule_id
);
...
...
src/smf_app/smf_context.hpp
View file @
63c7aca6
...
...
@@ -434,7 +434,7 @@ class smf_pdu_session : public std::enable_shared_from_this<smf_pdu_session> {
uint8_t
number_of_supported_packet_filters
;
//number_of_supported_packet_filters
util
::
uint_generator
<
uint32_t
>
qos_rule_id_generator
;
//
Recursive
lock
//
Shared
lock
mutable
std
::
shared_mutex
m_pdu_session_mutex
;
};
...
...
@@ -479,7 +479,7 @@ class session_management_subscription {
snssai_t
single_nssai
;
std
::
map
<
std
::
string
,
std
::
shared_ptr
<
dnn_configuration_t
>>
dnn_configurations
;
//dnn <->dnn_configuration
//
Recursive
lock
//
Shared
lock
mutable
std
::
shared_mutex
m_mutex
;
};
...
...
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