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
112717cc
Commit
112717cc
authored
Aug 20, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue: using unique_lock instead of shared_lock
parent
7a4844ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+8
-8
No files found.
src/smf_app/smf_app.cpp
View file @
112717cc
...
@@ -503,7 +503,7 @@ void smf_app::handle_itti_msg(itti_n11_create_sm_context_response &m) {
...
@@ -503,7 +503,7 @@ void smf_app::handle_itti_msg(itti_n11_create_sm_context_response &m) {
Logger
::
smf_app
().
debug
(
Logger
::
smf_app
().
debug
(
"PDU Session Create SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
"PDU Session Create SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
pdu_session_create_sm_context_response
sm_context_response
=
{
};
pdu_session_create_sm_context_response
sm_context_response
=
{
};
std
::
shared
_lock
lock
(
m_sm_context_create_promises
);
std
::
unique
_lock
lock
(
m_sm_context_create_promises
);
if
(
sm_context_create_promises
.
count
(
m
.
pid
)
>
0
){
if
(
sm_context_create_promises
.
count
(
m
.
pid
)
>
0
){
sm_context_create_promises
[
m
.
pid
]
->
set_value
(
m
.
res
);
sm_context_create_promises
[
m
.
pid
]
->
set_value
(
m
.
res
);
//Remove this promise from list
//Remove this promise from list
...
@@ -516,7 +516,7 @@ void smf_app::handle_itti_msg(itti_n11_update_sm_context_response &m) {
...
@@ -516,7 +516,7 @@ void smf_app::handle_itti_msg(itti_n11_update_sm_context_response &m) {
Logger
::
smf_app
().
debug
(
Logger
::
smf_app
().
debug
(
"PDU Session Update SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
"PDU Session Update SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
pdu_session_update_sm_context_response
sm_context_response
=
{
};
pdu_session_update_sm_context_response
sm_context_response
=
{
};
std
::
shared
_lock
lock
(
m_sm_context_update_promises
);
std
::
unique
_lock
lock
(
m_sm_context_update_promises
);
if
(
sm_context_update_promises
.
count
(
m
.
pid
)
>
0
){
if
(
sm_context_update_promises
.
count
(
m
.
pid
)
>
0
){
sm_context_update_promises
[
m
.
pid
]
->
set_value
(
m
.
res
);
sm_context_update_promises
[
m
.
pid
]
->
set_value
(
m
.
res
);
//Remove this promise from list
//Remove this promise from list
...
@@ -529,7 +529,7 @@ void smf_app::handle_itti_msg(itti_n11_release_sm_context_response &m) {
...
@@ -529,7 +529,7 @@ void smf_app::handle_itti_msg(itti_n11_release_sm_context_response &m) {
Logger
::
smf_app
().
debug
(
Logger
::
smf_app
().
debug
(
"PDU Session Release SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
"PDU Session Release SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
pdu_session_release_sm_context_response
sm_context_response
=
{
};
pdu_session_release_sm_context_response
sm_context_response
=
{
};
std
::
shared
_lock
lock
(
m_sm_context_release_promises
);
std
::
unique
_lock
lock
(
m_sm_context_release_promises
);
if
(
sm_context_release_promises
.
count
(
m
.
pid
)
>
0
){
if
(
sm_context_release_promises
.
count
(
m
.
pid
)
>
0
){
sm_context_release_promises
[
m
.
pid
]
->
set_value
(
m
.
res
);
sm_context_release_promises
[
m
.
pid
]
->
set_value
(
m
.
res
);
//Remove this promise from list
//Remove this promise from list
...
@@ -1142,14 +1142,14 @@ std::shared_ptr<smf_context> smf_app::supi_2_smf_context(
...
@@ -1142,14 +1142,14 @@ std::shared_ptr<smf_context> smf_app::supi_2_smf_context(
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
smf_app
::
set_supi_2_smf_context
(
const
supi64_t
&
supi
,
void
smf_app
::
set_supi_2_smf_context
(
const
supi64_t
&
supi
,
std
::
shared_ptr
<
smf_context
>
sc
)
{
std
::
shared_ptr
<
smf_context
>
sc
)
{
std
::
shared
_lock
lock
(
m_supi2smf_context
);
std
::
unique
_lock
lock
(
m_supi2smf_context
);
supi2smf_context
[
supi
]
=
sc
;
supi2smf_context
[
supi
]
=
sc
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
smf_app
::
set_scid_2_smf_context
(
const
scid_t
&
id
,
void
smf_app
::
set_scid_2_smf_context
(
const
scid_t
&
id
,
std
::
shared_ptr
<
smf_context_ref
>
scf
)
{
std
::
shared_ptr
<
smf_context_ref
>
scf
)
{
std
::
shared
_lock
lock
(
m_scid2smf_context
);
std
::
unique
_lock
lock
(
m_scid2smf_context
);
scid2smf_context
[
id
]
=
scf
;
scid2smf_context
[
id
]
=
scf
;
}
}
...
@@ -1465,7 +1465,7 @@ bool smf_app::get_session_management_subscription_data(
...
@@ -1465,7 +1465,7 @@ bool smf_app::get_session_management_subscription_data(
void
smf_app
::
add_promise
(
void
smf_app
::
add_promise
(
uint32_t
id
,
uint32_t
id
,
boost
::
shared_ptr
<
boost
::
promise
<
pdu_session_create_sm_context_response
>
>
&
p
)
{
boost
::
shared_ptr
<
boost
::
promise
<
pdu_session_create_sm_context_response
>
>
&
p
)
{
std
::
shared
_lock
lock
(
m_sm_context_create_promises
);
std
::
unique
_lock
lock
(
m_sm_context_create_promises
);
sm_context_create_promises
.
emplace
(
id
,
p
);
sm_context_create_promises
.
emplace
(
id
,
p
);
}
}
...
@@ -1473,7 +1473,7 @@ void smf_app::add_promise(
...
@@ -1473,7 +1473,7 @@ void smf_app::add_promise(
void
smf_app
::
add_promise
(
void
smf_app
::
add_promise
(
uint32_t
id
,
uint32_t
id
,
boost
::
shared_ptr
<
boost
::
promise
<
pdu_session_update_sm_context_response
>
>
&
p
)
{
boost
::
shared_ptr
<
boost
::
promise
<
pdu_session_update_sm_context_response
>
>
&
p
)
{
std
::
shared
_lock
lock
(
m_sm_context_update_promises
);
std
::
unique
_lock
lock
(
m_sm_context_update_promises
);
sm_context_update_promises
.
emplace
(
id
,
p
);
sm_context_update_promises
.
emplace
(
id
,
p
);
}
}
...
@@ -1481,7 +1481,7 @@ void smf_app::add_promise(
...
@@ -1481,7 +1481,7 @@ void smf_app::add_promise(
void
smf_app
::
add_promise
(
void
smf_app
::
add_promise
(
uint32_t
id
,
uint32_t
id
,
boost
::
shared_ptr
<
boost
::
promise
<
pdu_session_release_sm_context_response
>
>
&
p
)
{
boost
::
shared_ptr
<
boost
::
promise
<
pdu_session_release_sm_context_response
>
>
&
p
)
{
std
::
shared
_lock
lock
(
m_sm_context_release_promises
);
std
::
unique
_lock
lock
(
m_sm_context_release_promises
);
sm_context_release_promises
.
emplace
(
id
,
p
);
sm_context_release_promises
.
emplace
(
id
,
p
);
}
}
...
...
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