bluez: Add lock flag for capabilities.
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>
Thu, 19 Mar 2009 19:16:19 +0000 (16:16 -0300)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 9 Jan 2013 14:30:11 +0000 (14:30 +0000)
lock flag permits the unix client to detect if there is someone holding
the lock so it can prevent useless attempt of setting a new configuration.

sys/bluez/gstavdtpsink.c

index 8b57346..702f4ae 100644 (file)
@@ -252,7 +252,7 @@ gst_avdtp_find_caps (GstAvdtpSink * sink, uint8_t codec_type)
   int bytes_left = rsp->h.length - sizeof (*rsp);
 
   while (bytes_left > 0) {
-    if (codec->type == codec_type)
+    if ((codec->type == codec_type) && !(codec->lock & BT_WRITE_LOCK))
       break;
 
     bytes_left -= codec->length;