Was using linphone-daemon on linux.
When I ran the command: "config-set sound playback_dev_id ALSA: Intel HDA"
It would set playback_dev_id to "ALSA:"
The below patch fixed the issue:
diff --git a/daemon/commands/config.cc b/daemon/commands/config.cc
index 7a59bff..c4ed008 100644
--- a/daemon/commands/config.cc
+++ b/daemon/commands/config.cc
@@ -18,6 +18,7 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "configcommand.h"
+#include <regex>
using namespace std;
@@ -72,7 +73,9 @@ void ConfigSetCommand::exec(Daemon *app, const string& args) {
app->sendResponse(Response("Missing section and/or key names."));
return;
}
- ist>>value;
+ getline(ist, value);
+ value = std::regex_replace(value, std::regex("^ +"), "");
+ value = std::regex_replace(value, std::regex(" +$"), "");
lp_config_set_string(linphone_core_get_config(app->getCore()), section.c_str(), key.c_str(), value.size()>0 ? value.c_str() : NULL);
app->sendResponse(ConfigResponse(value.c_str()));
}