From: Szymon Janc <szymon.janc@codecoup.pl>
To: Bluez mailing list <linux-bluetooth@vger.kernel.org>
Cc: Szymon Janc <szymon.janc@codecoup.pl>
Subject: Re: [PATCH] gatt: Fix crash with BR/EDR only adapter
Date: Wed, 4 Apr 2018 12:04:54 +0200 [thread overview]
Message-ID: <CAAEJBhKLRbWcXZrnSFc-L3j1JnQ+xbpqRxiuAC2czgiXZxoHFw@mail.gmail.com> (raw)
In-Reply-To: <20180404073209.10282-1-szymon.janc@codecoup.pl>
On 4 April 2018 at 09:32, Szymon Janc <szymon.janc@codecoup.pl> wrote:
> adapter->database can be NULL if controller is BR/EDR only or LE was
> disabled. Make btd_gatt_database_restore_svc_chng_ccc accept NULL
> pointer and silently ignore it similiar to rest of btd_gatt_database
> API.
> ---
> src/gatt-database.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/gatt-database.c b/src/gatt-database.c
> index 1cdc72e1b..0ac5b75b0 100644
> --- a/src/gatt-database.c
> +++ b/src/gatt-database.c
> @@ -3330,6 +3330,9 @@ void btd_gatt_database_restore_svc_chng_ccc(struct btd_gatt_database *database)
> uint8_t value[4];
> uint16_t handle, ccc_handle;
>
> + if (!database)
> + return;
> +
> handle = gatt_db_attribute_get_handle(database->svc_chngd);
> ccc_handle = gatt_db_attribute_get_handle(database->svc_chngd_ccc);
>
> --
> 2.14.3
>
Applied.
--
pozdrawiam
Szymon K. Janc
prev parent reply other threads:[~2018-04-04 10:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-04 7:32 [PATCH] gatt: Fix crash with BR/EDR only adapter Szymon Janc
2018-04-04 10:04 ` Szymon Janc [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAEJBhKLRbWcXZrnSFc-L3j1JnQ+xbpqRxiuAC2czgiXZxoHFw@mail.gmail.com \
--to=szymon.janc@codecoup.pl \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).