From 6ef30dba0eb77593c9c6ce5843848961ba12d57b Mon Sep 17 00:00:00 2001 From: Hemant Gupta Date: Mon, 6 Jan 2014 14:28:28 +0530 Subject: [PATCH] GAP: Update local device name immediately Though the function btif_config_set_str requests to save device name immediately, sometimes it doesn't call save device name if the cached changes are more. So calling the "btif_config_save" explicitly to avoid failure cases. Change-Id: I9fb05caf284d6a6feb906f87a4db19896182d2c9 --- btif/src/btif_storage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c index f364701db..8e03c0595 100644 --- a/btif/src/btif_storage.c +++ b/btif/src/btif_storage.c @@ -274,6 +274,8 @@ static int prop2cfg(bt_bdaddr_t *remote_bd_addr, bt_property_t *prop) BTIF_STORAGE_PATH_REMOTE_NAME, value); else btif_config_set_str("Local", "Adapter", BTIF_STORAGE_KEY_ADAPTER_NAME, value); + /* save name immediately */ + btif_config_save(); break; case BT_PROPERTY_REMOTE_FRIENDLY_NAME: strncpy(value, (char*)prop->val, prop->len); -- 2.11.0