Correct argument escaping of --name paramter

Previously, the "" were treated as part of the devicename. This lead to Airplay names which included the "".
Instead, we must quote the whole argument, so that the name does not contain "".
This commit is contained in:
Christian Flach 2020-01-29 19:13:21 +01:00
parent 0aed04f9b3
commit c6cbc24163
No known key found for this signature in database
GPG key ID: 02D48802CD830869

View file

@ -52,7 +52,7 @@ AirplayStream::AirplayStream(PcmListener* pcmListener, boost::asio::io_context&
logStderr_ = true;
string devicename = uri_.getQuery("devicename", "Snapcast");
params_wo_port_ = "--name=\"" + devicename + "\" --output=stdout --use-stderr";
params_wo_port_ = "\"--name=" + devicename + "\" --output=stdout --use-stderr";
port_ = cpt::stoul(uri_.getQuery("port", "5000"));
setParamsAndPipePathFromPort();