[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] linphone-daemon patch

From: Mike Flood
Subject: Re: [Linphone-developers] linphone-daemon patch
Date: Wed, 6 May 2020 10:15:59 -0400 (EDT)

Tried that,

The result was:

playback_dev_id being set to "ALSA:

I even tried escaping the space with \ still no luck.

From: "Nick Briggs" <address@hidden>
To: "Mike Flood" <address@hidden>
Cc: "linphone-developers" <address@hidden>
Sent: Wednesday, May 6, 2020 12:39:10 AM
Subject: Re: [Linphone-developers] linphone-daemon patch

Why would you not have done

config-set sound playback_dev_id "ALSA: Intel HDA"

since the value had spaces in it...?

On May 5, 2020, at 8:03 PM, Mike Flood <address@hidden> wrote:

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/ b/daemon/commands/
index 7a59bff..c4ed008 100644
--- a/daemon/commands/
+++ b/daemon/commands/
@@ -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."));
-    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);

Linphone-developers mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]