mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
bluez5: remove battery when RFCOMM connection drops
There won't be further battery level updates when RFCOMM connection is down, so remove the battery then. Fix minor things with canceling the provider registration.
This commit is contained in:
parent
eb396f1ea8
commit
026e3882d2
3 changed files with 22 additions and 7 deletions
|
|
@ -174,6 +174,8 @@ static void rfcomm_free(struct rfcomm *rfcomm)
|
|||
spa_hook_remove(&rfcomm->transport_listener);
|
||||
spa_bt_transport_free(rfcomm->transport);
|
||||
}
|
||||
if (rfcomm->device)
|
||||
spa_bt_device_report_battery_level(rfcomm->device, SPA_BT_NO_BATTERY);
|
||||
free(rfcomm);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue