diff mbox series

[BlueZ,v1,2/2] gatt-database: Implement support to org.bluez.Error.ImproperlyConfigured

Message ID 20240426144826.2608852-2-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,v1,1/2] org.bluez.Gatt: Add org.bluez.Error.ImproperlyConfigured error to WriteValue | expand

Commit Message

Luiz Augusto von Dentz April 26, 2024, 2:48 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This implements support for handling when applications reply with
org.bluez.Error.ImproperlyConfigured the code will translate it to
BT_ERROR_CCC_IMPROPERLY_CONFIGURED.

Fixes: https://github.com/bluez/bluez/issues/827
---
 src/gatt-database.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/src/gatt-database.c b/src/gatt-database.c
index 7ca2f94222c6..d028ce012b99 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -2248,6 +2248,9 @@  static uint8_t dbus_error_to_att_ecode(const char *name, const char *msg,
 	if (strcmp(name, ERROR_INTERFACE ".InProgress") == 0)
 		return BT_ERROR_ALREADY_IN_PROGRESS;
 
+	if (strcmp(name, ERROR_INTERFACE ".ImproperlyConfigured"))
+		return BT_ERROR_CCC_IMPROPERLY_CONFIGURED;
+
 	if (strcmp(name, ERROR_INTERFACE ".NotPermitted") == 0)
 		return perm_err;