Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
cn5g
oai-cn5g-smf
Commits
26466c05
Commit
26466c05
authored
May 28, 2021
by
Tien-Thinh Nguyen
Browse files
Fix issue when triggering N1N2 message tranfer
parent
d59dd86c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/smf_app/smf_sbi.cpp
View file @
26466c05
...
...
@@ -1262,12 +1262,7 @@ void smf_sbi::curl_release_handles() {
std
::
string
curl_url
;
int
res
=
curl_easy_getinfo
(
curl
,
CURLINFO_EFFECTIVE_URL
,
&
curl_url
);
if
(
res
==
CURLE_OK
)
{
std
::
unique_lock
lock
(
m_curl_handle_promises
);
if
(
curl_handle_promises
.
count
(
curl_url
)
>
0
)
{
curl_handle_promises
[
curl_url
]
->
set_value
(
std
::
to_string
(
http_code
));
// Remove this promise from list
curl_handle_promises
.
erase
(
curl_url
);
}
trigger_process_response
(
curl_url
,
http_code
);
}
// TODO: remove handle from the multi session and end this handle now, or
...
...
@@ -1382,3 +1377,17 @@ void smf_sbi::add_promise(
std
::
unique_lock
lock
(
m_curl_handle_promises
);
curl_handle_promises
.
emplace
(
id
,
p
);
}
//------------------------------------------------------------------------------
void
smf_sbi
::
trigger_process_response
(
std
::
string
&
pid
,
uint32_t
http_code
)
{
Logger
::
smf_app
().
debug
(
"Trigger process response: Set promise with ID %s "
"to ready"
,
pid
.
c_str
());
std
::
unique_lock
lock
(
m_curl_handle_promises
);
if
(
curl_handle_promises
.
count
(
pid
)
>
0
)
{
curl_handle_promises
[
pid
]
->
set_value
(
std
::
to_string
(
http_code
));
// Remove this promise from list
curl_handle_promises
.
erase
(
pid
);
}
}
src/smf_app/smf_sbi.hpp
View file @
26466c05
...
...
@@ -222,6 +222,7 @@ class smf_sbi {
void
add_promise
(
std
::
string
id
,
boost
::
shared_ptr
<
boost
::
promise
<
std
::
string
>>&
p
);
void
trigger_process_response
(
std
::
string
&
pid
,
uint32_t
http_code
);
};
}
// namespace smf
#endif
/* FILE_SMF_SBI_HPP_SEEN */
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