OSDN Git Service

GAP: Update local device name immediately
authorHemant Gupta <hemantg@codeaurora.org>
Mon, 6 Jan 2014 08:58:28 +0000 (14:28 +0530)
committerHemant Gupta <hemantg@codeaurora.org>
Fri, 2 May 2014 12:04:17 +0000 (17:34 +0530)
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

index f364701..8e03c05 100644 (file)
@@ -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);