]> code.delx.au - pulseaudio/commitdiff
bluetooth: recognize only those BT devices that implement both the Audio and either...
authorLennart Poettering <lennart@poettering.net>
Sat, 15 Aug 2009 20:25:21 +0000 (22:25 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 15 Aug 2009 20:25:21 +0000 (22:25 +0200)
src/modules/bluetooth/bluetooth-util.c

index 66e1c31eb6eea5c6cc027831192e250fb7a90819..d5806b9694286ee47a29bb7d6e4c0330fd51126c 100644 (file)
@@ -122,9 +122,9 @@ static pa_bool_t device_is_audio(pa_bluetooth_device *d) {
 
     return
         d->device_info_valid &&
-        (d->audio_state != PA_BT_AUDIO_STATE_INVALID ||
-         d->audio_sink_state != PA_BT_AUDIO_STATE_INVALID ||
-         d->headset_state != PA_BT_AUDIO_STATE_INVALID);
+        (d->audio_state != PA_BT_AUDIO_STATE_INVALID &&
+         (d->audio_sink_state != PA_BT_AUDIO_STATE_INVALID ||
+          d->headset_state != PA_BT_AUDIO_STATE_INVALID));
 }
 
 static int parse_device_property(pa_bluetooth_discovery *y, pa_bluetooth_device *d, DBusMessageIter *i) {