From: Jaehyun Kim Date: Tue, 11 Feb 2025 08:20:25 +0000 (+0900) Subject: Remove fsync from init code X-Git-Tag: accepted/tizen/9.0/unified/20250212.171248^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=664199ef74b81778ea9ab9bd74e38eb528a37865;p=platform%2Fcore%2Fconnectivity%2Fstc-iptables.git Remove fsync from init code In situations where the system is busy, there are cases where delays occur due to the fsync code, preventing requests from being processed in a timely manner. To avoid this, the code has been removed. Removing this code will not affect the STC operations. Change-Id: I5e201d9506c5cd98808aad750349dcf121c04bd8 Signed-off-by: Jaehyun Kim --- diff --git a/src/helper/helper-config.c b/src/helper/helper-config.c index 243201a..ac8f7f6 100755 --- a/src/helper/helper-config.c +++ b/src/helper/helper-config.c @@ -46,7 +46,6 @@ static int __save_config_file(GKeyFile *keyfile, char *path) gsize length = 0; GError *error = NULL; int ret = 0; - FILE *fp = NULL; data = g_key_file_to_data(keyfile, &length, NULL); if (!g_file_set_contents(path, data, length, &error)) { @@ -55,14 +54,6 @@ static int __save_config_file(GKeyFile *keyfile, char *path) ret = -EIO; } - fp = fopen(path, "a+"); - if (fp) { - fflush(fp); - fsync(fp->_fileno); - fclose(fp); - STC_LOGD("Sync the file to disk"); - } - g_free(data); return ret; }