dbus/gattlib_notification: Print which UUID cannot be found

pull/204/head
Olivier Martin 2021-02-01 16:46:25 +01:00
parent acf3df7da6
commit b8f60de4e5
1 changed files with 5 additions and 1 deletions

View File

@ -152,7 +152,11 @@ static int connect_signal_to_characteristic_uuid(gatt_connection_t* connection,
struct dbus_characteristic dbus_characteristic = get_characteristic_from_uuid(connection, uuid);
if (dbus_characteristic.type == TYPE_NONE) {
puts("Not found");
char uuid_str[MAX_LEN_UUID_STR + 1];
gattlib_uuid_to_string(uuid, uuid_str, sizeof(uuid_str));
fprintf(stderr, "GATT characteristic '%s' not found\n", uuid_str);
return GATTLIB_NOT_FOUND;
}
#if BLUEZ_VERSION > BLUEZ_VERSIONS(5, 40)