OSDN Git Service

Add sync to write the backup file to the filesystem
authorAjay Panicker <apanicke@google.com>
Thu, 12 May 2016 22:52:01 +0000 (15:52 -0700)
committerAjay Panicker <apanicke@google.com>
Fri, 13 May 2016 22:57:18 +0000 (22:57 +0000)
Bug: 27354612
Change-Id: I5a7751b6f08831d43647391774501f211336e9eb

btif/src/btif_config.c

index eceb964..f2a8806 100644 (file)
@@ -489,6 +489,7 @@ static void btif_config_write(UNUSED_ATTR UINT16 event, UNUSED_ATTR char *p_para
 
   pthread_mutex_lock(&lock);
   rename(CONFIG_FILE_PATH, CONFIG_BACKUP_PATH);
+  sync();
   config_t *config_paired = config_new_clone(config);
   btif_config_remove_unpaired(config_paired);
   config_save(config_paired, CONFIG_FILE_PATH);