Re: [PATCH BlueZ 1/2] shared/gatt-client: Fix error when no service could be found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Jul 29, 2015 at 10:58 AM, Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
>
> In case the remote device has no services available ready callback would
> be called with success set to false but in fact it has succeeded it just
> did not find anything.
> ---
>  src/shared/gatt-client.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
> index 24aef18..903afa7 100644
> --- a/src/shared/gatt-client.c
> +++ b/src/shared/gatt-client.c
> @@ -971,6 +971,11 @@ static void discover_primary_cb(bool success, uint8_t att_ecode,
>                 util_debug(client->debug_callback, client->debug_data,
>                                         "Primary service discovery failed."
>                                         " ATT ECODE: 0x%02x", att_ecode);
> +               /* Reset error in case of not found */
> +               if (BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND) {
> +                       success = true;
> +                       att_ecode = 0;
> +               }
>                 goto secondary;
>         }
>
> --
> 2.1.0

Applied.


-- 
Luiz Augusto von Dentz
--
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



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux