[pulseaudio-discuss] [PATCH v2 2/6] switch-on-port-available: fix inverted if condition

Tanu Kaskinen tanuk at iki.fi
Fri Mar 4 10:57:34 UTC 2016


I'm sure the original intention was to switch the port if the target
port is available on the currently active profile.
---
 src/modules/module-switch-on-port-available.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c
index e5e1e9d..9bfb43f 100644
--- a/src/modules/module-switch-on-port-available.c
+++ b/src/modules/module-switch-on-port-available.c
@@ -193,7 +193,7 @@ static bool switch_to_port(pa_device_port *port) {
     pa_log_debug("Trying to switch to port %s", port->name);
     if (!pp.is_preferred_profile_active) {
         if (try_to_switch_profile(port) < 0) {
-            if (pp.is_possible_profile_active)
+            if (!pp.is_possible_profile_active)
                 return false;
         }
         else
-- 
2.7.0



More information about the pulseaudio-discuss mailing list