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
0061f800
Commit
0061f800
authored
Nov 29, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
6bbbb056
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
22 deletions
+4
-22
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+4
-17
src/smf_app/smf_app.hpp
src/smf_app/smf_app.hpp
+0
-5
No files found.
src/smf_app/smf_app.cpp
View file @
0061f800
...
@@ -332,7 +332,7 @@ smf_app::smf_app(const std::string& config_file)
...
@@ -332,7 +332,7 @@ smf_app::smf_app(const std::string& config_file)
:
m_seid2smf_context
(),
:
m_seid2smf_context
(),
m_supi2smf_context
(),
m_supi2smf_context
(),
m_scid2smf_context
(),
m_scid2smf_context
(),
m_s
m_context_create
_promises
()
{
m_s
bi_server
_promises
()
{
Logger
::
smf_app
().
startup
(
"Starting..."
);
Logger
::
smf_app
().
startup
(
"Starting..."
);
supi2smf_context
=
{};
supi2smf_context
=
{};
...
@@ -734,13 +734,9 @@ void smf_app::handle_itti_msg(
...
@@ -734,13 +734,9 @@ void smf_app::handle_itti_msg(
void
smf_app
::
handle_itti_msg
(
itti_n11_create_sm_context_response
&
m
)
{
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
=
{};
std
::
unique_lock
lock
(
m_sm_context_create_promises
);
trigger_http_response
(
if
(
sm_context_create_promises
.
count
(
m
.
pid
)
>
0
)
{
m
.
res
.
get_http_code
(),
m
.
pid
,
N11_SESSION_CREATE_SM_CONTEXT_RESPONSE
);
sm_context_create_promises
[
m
.
pid
]
->
set_value
(
m
.
res
);
// Remove this promise from list
sm_context_create_promises
.
erase
(
m
.
pid
);
}
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
@@ -2038,15 +2034,6 @@ bool smf_app::get_session_management_subscription_data(
...
@@ -2038,15 +2034,6 @@ bool smf_app::get_session_management_subscription_data(
return
true
;
return
true
;
}
}
//---------------------------------------------------------------------------------------------
void
smf_app
::
add_promise
(
uint32_t
id
,
boost
::
shared_ptr
<
boost
::
promise
<
pdu_session_create_sm_context_response
>>&
p
)
{
std
::
unique_lock
lock
(
m_sm_context_create_promises
);
sm_context_create_promises
.
emplace
(
id
,
p
);
}
//---------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------
void
smf_app
::
add_promise
(
void
smf_app
::
add_promise
(
uint32_t
id
,
boost
::
shared_ptr
<
boost
::
promise
<
nlohmann
::
json
>>&
p
)
{
uint32_t
id
,
boost
::
shared_ptr
<
boost
::
promise
<
nlohmann
::
json
>>&
p
)
{
...
...
src/smf_app/smf_app.hpp
View file @
0061f800
...
@@ -114,13 +114,8 @@ class smf_app {
...
@@ -114,13 +114,8 @@ class smf_app {
mutable
std
::
shared_mutex
m_scid2smf_context
;
mutable
std
::
shared_mutex
m_scid2smf_context
;
mutable
std
::
shared_mutex
m_smf_event_subscriptions
;
mutable
std
::
shared_mutex
m_smf_event_subscriptions
;
// Store promise IDs for Create/Update session
// Store promise IDs for Create/Update session
mutable
std
::
shared_mutex
m_sm_context_create_promises
;
mutable
std
::
shared_mutex
m_sbi_server_promises
;
mutable
std
::
shared_mutex
m_sbi_server_promises
;
std
::
map
<
uint32_t
,
boost
::
shared_ptr
<
boost
::
promise
<
pdu_session_create_sm_context_response
>>>
sm_context_create_promises
;
std
::
map
<
uint32_t
,
boost
::
shared_ptr
<
boost
::
promise
<
nlohmann
::
json
>>>
std
::
map
<
uint32_t
,
boost
::
shared_ptr
<
boost
::
promise
<
nlohmann
::
json
>>>
sbi_server_promises
;
sbi_server_promises
;
...
...
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