bluez: Fix return value check for bt_audio_service_open()
authorAnderson Lizardo <anderson.lizardo@openbossa.org>
Wed, 16 Nov 2011 13:20:04 +0000 (09:20 -0400)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 9 Jan 2013 14:30:13 +0000 (14:30 +0000)
Only negative values (namely -1) are errors for this function.

sys/bluez/gstavdtpsink.c

index 9603c1f..27c4c25 100644 (file)
@@ -1440,7 +1440,7 @@ gst_avdtp_sink_start (GstBaseSink * basesink)
   self->watch_id = 0;
 
   sk = bt_audio_service_open ();
-  if (sk <= 0) {
+  if (sk < 0) {
     err = -errno;
     GST_ERROR_OBJECT (self, "Cannot open connection to bt "
         "audio service: %s %d", strerror (-err), -err);