Update logprint 64/199864/2
authorsinikang <sinikang@samsung.com>
Fri, 15 Feb 2019 05:49:34 +0000 (14:49 +0900)
committersinikang <sinikang@samsung.com>
Fri, 15 Feb 2019 05:52:14 +0000 (14:52 +0900)
- migration from http://slp-info.sec.samsung.net/gerrit/#/c/3156343/

Change-Id: Ifbfedce2c1426e6f804c485aae85b849fa1ef2a6
Signed-off-by: sinikang <sinikang@samsung.com>
packaging/telephony-daemon.spec
src/main.c

index e08b2f9..87266c5 100644 (file)
@@ -1,6 +1,6 @@
 %define major 1
 %define minor 4
-%define patchlevel 11
+%define patchlevel 12
 
 Name:           telephony-daemon
 Version:        %{major}.%{minor}.%{patchlevel}
index 2b9735a..bdb989e 100644 (file)
@@ -98,7 +98,7 @@ void tcore_log(enum tcore_log_type type, enum tcore_log_priority priority, const
                        err("fopen() failed");
                        return;
                }
-               if (fscanf(fp, "%f %f", &a, &b) != 1)
+               if (fscanf(fp, "%f %f", &a, &b) == 0)
                        next = snprintf(buf, BUFFER_SIZE, "[UPTIME] [Not Set] ");
                else
                        next = snprintf(buf, BUFFER_SIZE, "[UPTIME] %f ", a);
@@ -143,6 +143,7 @@ static void telephony_signal_handler(int signo)
                tcore_server_exit(_server);
                dbg("*~*~*~* Signal: [SIGTERM] finished *~*~*~*");
        } break;
+
 #if defined(TIZEN_PROFILE_TV) || defined(TIZEN_PROFILE_IVI)
        case SIGHUP: {
                warn("*~*~*~* Ignore Signal: [SIGHUP] *~*~*~*");
@@ -186,7 +187,7 @@ static void __log_uptime()
                return;
        }
        info("scanned %d items", fscanf(fp, "%f %f", &a, &b));
-       info("proc uptime = %f idletime = %f\n", a, b);
+       info("proc uptime = %f idletime = %f", a, b);
        fclose(fp);
 }
 
@@ -228,12 +229,10 @@ static void *__load_plugin(const gchar *filename, struct tcore_plugin_define_des
 {
        void *handle = NULL;
        struct tcore_plugin_define_desc *desc = NULL;
-       struct stat stat_buf;
-       char file_date[27];
 
        handle = dlopen(filename, RTLD_LAZY);
        if (NULL == handle) {
-               err("dlopen() failed:[%s]", filename);
+               err("dlopen() failed:[%s][%s]", filename, dlerror());
                return NULL;
        }
 
@@ -244,21 +243,7 @@ static void *__load_plugin(const gchar *filename, struct tcore_plugin_define_des
                return NULL;
        }
 
-       dbg("%s plugin", desc->name);
-       dbg(" - path = %s", filename);
-       dbg(" - version = %d", desc->version);
-       dbg(" - priority = %d", desc->priority);
-
-       memset(&stat_buf, 0x00, sizeof(stat_buf));
-       memset(&file_date, '\0', sizeof(file_date));
-
-       if (0 == stat(filename, &stat_buf)) {
-               if (NULL != ctime_r(&stat_buf.st_mtime, file_date)) {
-                       if (1 < strlen(file_date))
-                               file_date[strlen(file_date)-1] = '\0';
-                       dbg(" - date = %s", file_date);
-               }
-       }
+       dbg("%s (%s) version:[%d] priority:[%d] ", desc->name, filename, desc->version, desc->priority);
 
        if (G_LIKELY(desc->load)) {
                if (G_UNLIKELY(FALSE == desc->load())) {
@@ -348,10 +333,8 @@ int main(int argc, char *argv[])
 
        /* Version Info */
        tcore_ver = tcore_util_get_version();
-       info("daemon version: [%s] libtcore version: [%s] glib version: [%u.%u.%u]",
-               DAEMON_VERSION, tcore_ver, glib_major_version, glib_minor_version, glib_micro_version);
+       info("[version] daemon : %s, libtcore : %s, glib : %u.%u.%u", DAEMON_VERSION, tcore_ver, glib_major_version, glib_minor_version, glib_micro_version);
        free(tcore_ver);
-       info("glib version: %u.%u.%u", glib_major_version, glib_minor_version, glib_micro_version);
 
        /* Telephony reset handling*/
        vconf_get_int(VCONFKEY_TELEPHONY_DAEMON_LOAD_COUNT, &daemon_load_count);