Re: [PATCH v1] Adapter: Fix Discovering state while Powering Off |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hi Hemant,
On Fri, Mar 30, 2012, Hemant Gupta wrote:
> This patch fixes the adater discovering state while powering off.
> Without this fix, BlueZ sends incorrect discovering state to upper
> layers while switching off.
> ---
> src/adapter.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index f8f46f8..eb9745f 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -289,6 +289,12 @@ static int set_mode(struct btd_adapter *adapter, uint8_t new_mode,
> return err;
>
> adapter->off_requested = TRUE;
> + /*
> + * Change the discovering state to FALSE, otherwise
> + * inquiry fails to start if BT is switched off and then on
> + * while inquiry is already active.
> + */
> + adapter->discovering = FALSE;
>
> goto done;
> }
Wouldn't the right place to do this be in btd_adapter_stop()? (after
sending the Discovering signal). Actually, wouldn't the right thing be
to call adapter_set_discovering() in btd_adapter_stop?
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Bluez Devel]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Bluez Devel]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Big List of Linux Books]