mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-06 10:09:33 +02:00
Cleanup
This commit is contained in:
parent
c9e591ed45
commit
180428283d
2 changed files with 6 additions and 11 deletions
|
@ -5,11 +5,9 @@ if(POLICY CMP0144)
|
||||||
cmake_policy(SET CMP0144 NEW)
|
cmake_policy(SET CMP0144 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# The FindBoost module is removed.
|
# The FindBoost module is removed. CI is failing, maybe because it uses just the
|
||||||
# CI is failing, maybe because it uses just the downloaded headers without being installed
|
# downloaded headers without being installed if(POLICY CMP0167) cmake_policy(SET
|
||||||
# if(POLICY CMP0167)
|
# CMP0167 NEW) endif()
|
||||||
# cmake_policy(SET CMP0167 NEW)
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
project(
|
project(
|
||||||
snapcast
|
snapcast
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
// 3rd party headers
|
// 3rd party headers
|
||||||
|
|
||||||
// standard headers
|
// standard headers
|
||||||
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,13 +42,9 @@ static constexpr auto LOG_TAG = "TcpStream";
|
||||||
TcpStream::TcpStream(PcmStream::Listener* pcmListener, boost::asio::io_context& ioc, const ServerSettings& server_settings, const StreamUri& uri)
|
TcpStream::TcpStream(PcmStream::Listener* pcmListener, boost::asio::io_context& ioc, const ServerSettings& server_settings, const StreamUri& uri)
|
||||||
: AsioStream<tcp::socket>(pcmListener, ioc, server_settings, uri), reconnect_timer_(ioc)
|
: AsioStream<tcp::socket>(pcmListener, ioc, server_settings, uri), reconnect_timer_(ioc)
|
||||||
{
|
{
|
||||||
|
static constexpr uint16_t DEFAULT_PORT = 4953;
|
||||||
host_ = uri_.host;
|
host_ = uri_.host;
|
||||||
auto host_port = utils::string::split(host_, ':');
|
port_ = uri_.port.value_or(DEFAULT_PORT);
|
||||||
port_ = 4953;
|
|
||||||
if (uri_.port.has_value())
|
|
||||||
{
|
|
||||||
port_ = uri_.port.value();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto mode = uri_.getQuery("mode", "server");
|
auto mode = uri_.getQuery("mode", "server");
|
||||||
if (mode == "server")
|
if (mode == "server")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue