From e3c14b2627ed8fd6277a72761539cb54111fc205 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 15 Feb 2016 13:44:27 +0200 Subject: [PATCH] core/device: Fix not reseting database if attributes cannot be loaded 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 235145ab5..89462ca61 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.47.3