diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-03-14 14:46:21 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-03-14 14:46:21 -0700 |
commit | 8fb8f9e73ff8b1f79c668fe1cfb2eb89e3599721 (patch) | |
tree | 64a4af6b1f86e0c3537f686721f3b9bba7b6a5b8 /src/gatt-database.c | |
parent | 42e99371584cc26c637fcc332de437d2c646f324 (diff) | |
download | bluez-8fb8f9e73ff8b1f79c668fe1cfb2eb89e3599721.tar.gz |
gatt: Print error if gatt_db_attribut_notify fails
This prints an error if gatt_db_attribut_notify fails.
Diffstat (limited to 'src/gatt-database.c')
-rw-r--r-- | src/gatt-database.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gatt-database.c b/src/gatt-database.c index 485af04ea..d6c94058c 100644 --- a/src/gatt-database.c +++ b/src/gatt-database.c @@ -1523,8 +1523,9 @@ static void send_service_changed(struct btd_gatt_database *database, put_le16(start, value); put_le16(end, value + 2); - gatt_db_attribute_notify(database->svc_chngd, value, sizeof(value), - NULL); + if (!gatt_db_attribute_notify(database->svc_chngd, value, sizeof(value), + NULL)) + error("Failed to notify Service Changed"); } static void gatt_db_service_added(struct gatt_db_attribute *attrib, @@ -3967,6 +3968,7 @@ void btd_gatt_database_restore_svc_chng_ccc(struct btd_gatt_database *database) put_le16(0x0001, value); put_le16(0xffff, value + 2); - gatt_db_attribute_notify(database->svc_chngd, value, sizeof(value), - NULL); + if (!gatt_db_attribute_notify(database->svc_chngd, value, sizeof(value), + NULL)) + error("Failed to notify Service Changed"); } |