core: Set GATT.Cache default in init_defaults
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 12 Jul 2018 17:01:13 +0000 (20:01 +0300)
committerhimanshu <h.himanshu@samsung.com>
Tue, 14 Jan 2020 08:53:35 +0000 (14:23 +0530)
Change-Id: I41a373066b0fd325981b2bbd03d014186053b10d
Signed-off-by: himanshu <h.himanshu@samsung.com>
src/main.c

index f9baab1..ec7f40b 100755 (executable)
@@ -434,8 +434,8 @@ static void parse_config(GKeyFile *config)
 #endif
        str = g_key_file_get_string(config, "GATT", "Cache", &err);
        if (err) {
+               DBG("%s", err->message);
                g_clear_error(&err);
-               main_opts.gatt_cache = BT_GATT_CACHE_ALWAYS;
        } else {
                main_opts.gatt_cache = parse_gatt_cache(str);
                g_free(str);
@@ -492,6 +492,7 @@ static void init_defaults(void)
        main_opts.did_product = 0x0246;         /* BlueZ */
        main_opts.did_version = (major << 8 | minor);
 
+       main_opts.gatt_cache = BT_GATT_CACHE_ALWAYS;
        main_opts.gatt_mtu = BT_ATT_MAX_LE_MTU;
 #endif
 }