Parent: 347348a3ddf4b4432899c91defbe5f86ca72a806
Author: Archie Pusaka <apusaka@chromium.org>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2021-02-22 20:21:39
Tree: 05e9100cf115f4dd30de7db8d843b4d0c96e2093
adapter: Check whether adapter is pending powered The powered setting of adapter is frequently being checked, but the check only accounts for whether it currently is powered. When powering off the adapter, there is a brief moment when the adapter is already off kernel-wise, but powered property is still true. If powered property is accessed at this time, some problems might occur. For example, if RemoveDevice DBus API is called, we would still carry out the request and remove the device from the user space, but we would fail to remove it from the kernel, therefore resulting an error when we want to re-pair the device. This patch addresses this issue by also checking whether adapter is being powered off when checking for powered. Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>
Diffstat
| M | src/adapter.c | | | 38 | +++++++++++++++++++- - - - - - - - - - - - - - - - - - - |
1 files changed, 19 insertions(+), 19 deletions(-)