Commit 754f4048 authored by Max Kellermann's avatar Max Kellermann

output/shout: evaluate `tls` option only if TLS is enabled in libshout

Fixes build failure after commit 0cea67ee
parent 037bb07d
......@@ -141,6 +141,7 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block)
protocol = SHOUT_PROTOCOL_HTTP;
}
#ifdef SHOUT_TLS
unsigned tls;
value = block.GetBlockValue("tls");
if (value != nullptr) {
......@@ -159,6 +160,7 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block)
} else {
tls = SHOUT_TLS_DISABLED;
}
#endif
if (shout_set_host(shout_conn, host) != SHOUTERR_SUCCESS ||
shout_set_port(shout_conn, port) != SHOUTERR_SUCCESS ||
......@@ -170,7 +172,9 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block)
shout_set_format(shout_conn, shout_format)
!= SHOUTERR_SUCCESS ||
shout_set_protocol(shout_conn, protocol) != SHOUTERR_SUCCESS ||
#ifdef SHOUT_TLS
shout_set_tls(shout_conn, tls) != SHOUTERR_SUCCESS ||
#endif
shout_set_agent(shout_conn, "MPD") != SHOUTERR_SUCCESS)
throw std::runtime_error(shout_get_error(shout_conn));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment