Skip to content
  • Igor Kovalenko's avatar
    bluetooth: Fix device->adapter dependency while releasing discovery · 1a3ffd4c
    Igor Kovalenko authored and PulseAudio Marge Bot's avatar PulseAudio Marge Bot committed
    Change d7f95170 added a dependency on device
    adapter pointer being valid while checking if bluetooth profile is supported by
    device.
    
    When adapter object is released, each device holding pointer to adapter being
    released is notified to reset that to NULL. Since adapter objects are released
    first when discovery object is unreferenced, each device will have adapter
    pointer reset before the time device objects are released.
    
    Fix observed crash by examining device adapter pointer. If it is NULL report
    that device does not support any bluetooth profile instead of looking at UUIDs
    supported by adapter.
    
    Part-of: <pulseaudio/pulseaudio!646>
    1a3ffd4c