OSDN Git Service

audio: Fix gateway state check
authorMikel Astiz <mikel.astiz@bmw-carit.de>
Fri, 4 May 2012 13:14:35 +0000 (15:14 +0200)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 7 May 2012 14:05:39 +0000 (07:05 -0700)
Gateway should be considered active also if connecting or playing.

This could for example lead to manager_find_device() not returning a
device that is connecting, and thus the corresponding endpoint would
never be created in the Media API.

audio/device.c

index a9d35f9..ee1ade1 100644 (file)
@@ -701,7 +701,7 @@ gboolean audio_device_is_active(struct audio_device *dev,
                                control_is_active(dev))
                return TRUE;
        else if (!strcmp(interface, AUDIO_GATEWAY_INTERFACE) && dev->gateway &&
-                               gateway_is_connected(dev))
+                               gateway_is_active(dev))
                return TRUE;
 
        return FALSE;