style(sonar): fix cpp:S6185 (#4133)
This commit is contained in:
parent
a28c20df18
commit
dbe80d0f92
17 changed files with 73 additions and 41 deletions
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
// standard includes
|
||||
#include <filesystem>
|
||||
#include <format>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
|
|
@ -636,7 +637,7 @@ namespace nvhttp {
|
|||
tree.put("root.<xmlattr>.status_code", 400);
|
||||
tree.put(
|
||||
"root.<xmlattr>.status_message",
|
||||
"Pin must be 4 digits, " + std::to_string(pin.size()) + " provided"
|
||||
std::format("Pin must be 4 digits, {} provided", pin.size())
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -896,7 +897,15 @@ namespace nvhttp {
|
|||
}
|
||||
|
||||
tree.put("root.<xmlattr>.status_code", 200);
|
||||
tree.put("root.sessionUrl0", launch_session->rtsp_url_scheme + net::addr_to_url_escaped_string(request->local_endpoint().address()) + ':' + std::to_string(net::map_port(rtsp_stream::RTSP_SETUP_PORT)));
|
||||
tree.put(
|
||||
"root.sessionUrl0",
|
||||
std::format(
|
||||
"{}{}:{}",
|
||||
launch_session->rtsp_url_scheme,
|
||||
net::addr_to_url_escaped_string(request->local_endpoint().address()),
|
||||
static_cast<int>(net::map_port(rtsp_stream::RTSP_SETUP_PORT))
|
||||
)
|
||||
);
|
||||
tree.put("root.gamesession", 1);
|
||||
|
||||
rtsp_stream::launch_session_raise(launch_session);
|
||||
|
|
@ -978,7 +987,15 @@ namespace nvhttp {
|
|||
}
|
||||
|
||||
tree.put("root.<xmlattr>.status_code", 200);
|
||||
tree.put("root.sessionUrl0", launch_session->rtsp_url_scheme + net::addr_to_url_escaped_string(request->local_endpoint().address()) + ':' + std::to_string(net::map_port(rtsp_stream::RTSP_SETUP_PORT)));
|
||||
tree.put(
|
||||
"root.sessionUrl0",
|
||||
std::format(
|
||||
"{}{}:{}",
|
||||
launch_session->rtsp_url_scheme,
|
||||
net::addr_to_url_escaped_string(request->local_endpoint().address()),
|
||||
static_cast<int>(net::map_port(rtsp_stream::RTSP_SETUP_PORT))
|
||||
)
|
||||
);
|
||||
tree.put("root.resume", 1);
|
||||
|
||||
rtsp_stream::launch_session_raise(launch_session);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue