Removed fsync 24/188424/1 accepted/tizen/unified/20180907.043147 submit/tizen/20180907.021206
authorhyunuktak <hyunuk.tak@samsung.com>
Wed, 5 Sep 2018 04:30:23 +0000 (13:30 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Wed, 5 Sep 2018 04:30:25 +0000 (13:30 +0900)
Change-Id: Ic40d8d2d0d823b385264c62faf237302fd779aab
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/stc-iptables.spec
src/helper/helper-log.c
src/helper/helper-log.h
src/stc-iptables.c

index 127523786defbb6c9e3fd5b2066651d5b3f9b152..3dc8e2047bd17692004da5ce3539618750fd39d9 100644 (file)
@@ -1,6 +1,6 @@
 Name:       stc-iptables
 Summary:    STC(Smart Traffic Control) iptables
-Version:    0.0.21
+Version:    0.0.22
 Release:    0
 Group:      Network & Connectivity/Other
 License:    GPL-2.0 and Apache-2.0
index b745a101331124276afd940e94de7b6a83eea435..75edb6b159da06fb2b203bb5dab83eb8bbba0fe3 100755 (executable)
@@ -129,21 +129,6 @@ void helper_log(const char *format, ...)
        va_end(ap);
 }
 
-gboolean helper_log_sync(gpointer data)
-{
-       if (log_file) {
-               fflush(log_file);
-               fsync(log_file->_fileno);
-       }
-
-#ifdef TIZEN_GTESTS
-       void __gcov_flush(void);
-       __gcov_flush();
-#endif
-
-       return TRUE;
-}
-
 void helper_log_cleanup(void)
 {
        if (log_file == NULL)
index 5599ae895ee8dd72cf632ee0405f2408ee51f261..8f56b096d2cc87657fdc498a11fd36bd6a7c1488 100755 (executable)
@@ -19,7 +19,6 @@
 #define __STC_HELPER_LOG_H__
 
 void helper_log(const char *format, ...);
-gboolean helper_log_sync(gpointer data);
 void helper_log_cleanup(void);
 
 #define __LOG(level, format, arg...) \
@@ -28,8 +27,6 @@ void helper_log_cleanup(void);
                        __FUNCTION__, __LINE__, ##arg); \
        } while(0)
 
-#define LOG_SYNC_TIME  1500
-
 #define LOG_INFO   "I"
 #define LOG_WARN   "W"
 #define LOG_ERROR  "E"
index b93621b467a8d20d414937de3b1d4d64f63b8035..1d8274ee412d9b00b9197bcfbd783abf3251fa71 100755 (executable)
@@ -63,7 +63,6 @@ gint32 main(gint32 argc, gchar *argv[])
 {
        GMainLoop *main_loop = NULL;
        gint32 ret = -1;
-       int sync_timer = 0;
 
        STC_LOGI("Smart Traffic Control Iptables");
 
@@ -79,9 +78,6 @@ gint32 main(gint32 argc, gchar *argv[])
        g_type_init();
 #endif
 
-       sync_timer = g_timeout_add(LOG_SYNC_TIME,
-                                       helper_log_sync, NULL);
-
        /* Crate the GLIB main loop */
        main_loop = g_main_loop_new(NULL, FALSE);
 
@@ -96,10 +92,6 @@ gint32 main(gint32 argc, gchar *argv[])
        ret = 0;
 
 fail:
-
-       if (sync_timer > 0)
-               g_source_remove(sync_timer);
-
        helper_log_cleanup();
        __stc_iptables_deinit();