[pulseaudio-discuss] [PATCH 2/3] switch-on-port-available: fix inverted if condition
Tanu Kaskinen
tanuk at iki.fi
Tue Feb 16 16:38:53 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 1b917ec..bef079b 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