summaryrefslogtreecommitdiff
path: root/src/storage.c
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2016-06-15 15:39:36 +0530
committerNiraj Kumar Goit <niraj.g@samsung.com>2016-06-17 21:27:27 +0530
commita59c6e4a0176ca9ad05c1980dcebfbb07b8a188f (patch)
tree9e473cf3e56f21048704ac4674afe6718bda1ffe /src/storage.c
parent46c06a384067f29cdd9f1550278cda29798db7b2 (diff)
downloadconnman-a59c6e4a0176ca9ad05c1980dcebfbb07b8a188f.tar.gz
connman-a59c6e4a0176ca9ad05c1980dcebfbb07b8a188f.tar.bz2
connman-a59c6e4a0176ca9ad05c1980dcebfbb07b8a188f.zip
[SPIN] Fix the connman bugs.
- Fixed NTP service's DNS resolving failure in Hive project. - Do not turn "wlan0" interface down in cleanup_devices(). - Set resource limits "RLIMIT_NOFILE" for a process. - After appending a file, fflush and fsync all modified in-core data of the file. Change-Id: I2767b3302d6204d066fe2075027828ff209d0ee0 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'src/storage.c')
-rwxr-xr-xsrc/storage.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/storage.c b/src/storage.c
index 7d031303..2da54d6c 100755
--- a/src/storage.c
+++ b/src/storage.c
@@ -23,6 +23,7 @@
#include <config.h>
#endif
+#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <sys/stat.h>
@@ -73,6 +74,19 @@ static int storage_save(GKeyFile *keyfile, char *pathname)
ret = -EIO;
}
+#if defined TIZEN_EXT
+ {
+ FILE *fp = NULL;
+ fp = fopen(pathname, "a+");
+ if(fp){
+ fflush(fp);
+ fsync(fp->_fileno);
+ fclose(fp);
+ DBG("sync the file to disk");
+ }
+ }
+#endif
+
g_free(data);
return ret;