From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> If one or more attributes cannot be loaded it means the database is probably in a bad state so just clear it so the attributes can be discovered again. --- src/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 235145a..89462ca 100644 --- a/src/device.c +++ b/src/device.c @@ -3165,8 +3165,10 @@ static int load_gatt_db_impl(GKeyFile *key_file, char **keys, } g_free(value); - if (ret) + if (ret) { + gatt_db_clear(db); return ret; + } } if (current_service) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html