diff mbox series

[Bluez,v1] gatt: Fix service_changed characteristic permission

Message ID 20200421155828.Bluez.v1.1.I6e4fbf41b1815dc3d497da5d9c94b18e9c912cba@changeid (mailing list archive)
State Accepted
Delegated to: Luiz Von Dentz
Headers show
Series [Bluez,v1] gatt: Fix service_changed characteristic permission | expand

Commit Message

Archie Pusaka April 21, 2020, 7:59 a.m. UTC
From: Archie Pusaka <apusaka@chromium.org>

According to bluetooth spec Ver 5.2, Vol 3, Part G, 7.1, the
service_changed characteristic is not readable. Therefore, this
patch marks it as such.
---

 src/gatt-database.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Archie Pusaka April 28, 2020, 4:30 a.m. UTC | #1
Hi BlueZ maintainers,

Please kindly take a look at this patch, thank you!

On Tue, 21 Apr 2020 at 15:59, Archie Pusaka <apusaka@google.com> wrote:
>
> From: Archie Pusaka <apusaka@chromium.org>
>
> According to bluetooth spec Ver 5.2, Vol 3, Part G, 7.1, the
> service_changed characteristic is not readable. Therefore, this
> patch marks it as such.
> ---
>
>  src/gatt-database.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gatt-database.c b/src/gatt-database.c
> index f2da27694..8cbe09bae 100644
> --- a/src/gatt-database.c
> +++ b/src/gatt-database.c
> @@ -1197,7 +1197,7 @@ static void populate_gatt_service(struct btd_gatt_database *database)
>
>         bt_uuid16_create(&uuid, GATT_CHARAC_SERVICE_CHANGED);
>         database->svc_chngd = gatt_db_service_add_characteristic(service, &uuid,
> -                               BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_INDICATE,
> +                               BT_ATT_PERM_NONE, BT_GATT_CHRC_PROP_INDICATE,
>                                 NULL, NULL, database);
>
>         database->svc_chngd_ccc = service_add_ccc(service, database, NULL, NULL,
> --
> 2.26.1.301.g55bc3eb7cb9-goog
>
Luiz Augusto von Dentz April 28, 2020, 4:55 p.m. UTC | #2
Hi Archie,

On Mon, Apr 27, 2020 at 9:31 PM Archie Pusaka <apusaka@google.com> wrote:
>
> Hi BlueZ maintainers,
>
> Please kindly take a look at this patch, thank you!
>
> On Tue, 21 Apr 2020 at 15:59, Archie Pusaka <apusaka@google.com> wrote:
> >
> > From: Archie Pusaka <apusaka@chromium.org>
> >
> > According to bluetooth spec Ver 5.2, Vol 3, Part G, 7.1, the
> > service_changed characteristic is not readable. Therefore, this
> > patch marks it as such.
> > ---
> >
> >  src/gatt-database.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/gatt-database.c b/src/gatt-database.c
> > index f2da27694..8cbe09bae 100644
> > --- a/src/gatt-database.c
> > +++ b/src/gatt-database.c
> > @@ -1197,7 +1197,7 @@ static void populate_gatt_service(struct btd_gatt_database *database)
> >
> >         bt_uuid16_create(&uuid, GATT_CHARAC_SERVICE_CHANGED);
> >         database->svc_chngd = gatt_db_service_add_characteristic(service, &uuid,
> > -                               BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_INDICATE,
> > +                               BT_ATT_PERM_NONE, BT_GATT_CHRC_PROP_INDICATE,
> >                                 NULL, NULL, database);
> >
> >         database->svc_chngd_ccc = service_add_ccc(service, database, NULL, NULL,
> > --
> > 2.26.1.301.g55bc3eb7cb9-goog

Applied, thanks.
diff mbox series

Patch

diff --git a/src/gatt-database.c b/src/gatt-database.c
index f2da27694..8cbe09bae 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -1197,7 +1197,7 @@  static void populate_gatt_service(struct btd_gatt_database *database)
 
 	bt_uuid16_create(&uuid, GATT_CHARAC_SERVICE_CHANGED);
 	database->svc_chngd = gatt_db_service_add_characteristic(service, &uuid,
-				BT_ATT_PERM_READ, BT_GATT_CHRC_PROP_INDICATE,
+				BT_ATT_PERM_NONE, BT_GATT_CHRC_PROP_INDICATE,
 				NULL, NULL, database);
 
 	database->svc_chngd_ccc = service_add_ccc(service, database, NULL, NULL,