Fix dlog format argument error
[platform/core/uifw/stt.git] / common / stt_config_mgr.c
index b7cf83b..12fe905 100755 (executable)
@@ -662,6 +662,8 @@ static void __get_engine_list(const char* directory)
        if (NULL == directory) {
                SLOG(LOG_ERROR, stt_tag(), "[Directory ERROR] Directory is NULL");
                return;
+       } else {
+               SLOG(LOG_DEBUG, stt_tag(), "[Directory DEBUG] Directory: %s", directory);
        }
 
        dp  = opendir(directory);
@@ -677,7 +679,7 @@ static void __get_engine_list(const char* directory)
                                char* filepath = NULL;
                                int filesize;
 
-                               filesize = strlen(STT_DEFAULT_ENGINE_INFO) + strlen(dirp->d_name) + 5;
+                               filesize = strlen(directory) + strlen(dirp->d_name) + 5;
                                filepath = (char*)calloc(filesize, sizeof(char));
 
                                if (NULL != filepath) {
@@ -687,6 +689,8 @@ static void __get_engine_list(const char* directory)
                                        continue;
                                }
 
+                               SLOG(LOG_DEBUG, stt_tag(), "[File DEBUG] File path: %s", filepath);
+
                                if (0 == stt_parser_get_engine_info(filepath, &info)) {
                                        g_engine_list = g_slist_append(g_engine_list, info);
                                }
@@ -1703,7 +1707,7 @@ int stt_config_mgr_add_time_info(int index, int event, const char* text, long st
        info->start_time = start_time;
        info->end_time = end_time;
 
-       SLOG(LOG_DEBUG, stt_tag(), "[DEBUG] inside stt_config_mgr_add_time_info: index(%d), text(%s), start time(%d), end_time(%d)", info->index, (NULL == info->text) ? "NULL" : info->text, info->start_time, info->end_time);
+       SLOG(LOG_DEBUG, stt_tag(), "[DEBUG] inside stt_config_mgr_add_time_info: index(%d), text(%s), start time(%ld), end_time(%ld)", info->index, (NULL == info->text) ? "NULL" : info->text, info->start_time, info->end_time);
 
        /* Add item to global list */
        g_time_list = g_slist_append(g_time_list, info);
@@ -1725,7 +1729,7 @@ int stt_config_mgr_foreach_time_info(stt_config_result_time_cb callback, void* u
        ret = stt_parser_get_time_info(&temp_time);
        if (0 != ret) {
                SLOG(LOG_WARN, stt_tag(), "[WARNING] Fail to get time info : %d", ret);
-               return STT_CONFIG_ERROR_OPERATION_FAILED;
+               return STT_CONFIG_ERROR_NONE;
        }
 
        GSList *iter = NULL;