From 363da064d395925f46be7793ece5800ec66a82ab Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 27 Feb 2009 18:21:25 +0200 Subject: Don't call read scan enable if the adapter is powering down When powering down we explicitly set the scan mode to 0 before calling the HCI_DEVDOWN ioctl. To avoid HCI command timeouts track this situation and don't call read scan enable in dbus-hci.c when the command complete for the write scan enable arrives. --- src/dbus-hci.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/dbus-hci.c') diff --git a/src/dbus-hci.c b/src/dbus-hci.c index 894b4492..65919083 100644 --- a/src/dbus-hci.c +++ b/src/dbus-hci.c @@ -1097,6 +1097,9 @@ void hcid_dbus_setscan_enable_complete(bdaddr_t *local) return; } + if (adapter_powering_down(adapter)) + return; + dev_id = adapter_get_dev_id(adapter); dd = hci_open_dev(dev_id); -- cgit