Commit 63c7aca6 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

bug fix for mutex after mege

parent 9c047060
......@@ -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)
......@@ -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);
......
......@@ -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;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment