Fix name for better readability 36/261536/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Tue, 20 Jul 2021 08:15:12 +0000 (17:15 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Tue, 20 Jul 2021 09:09:43 +0000 (18:09 +0900)
Change-Id: I038f749213b8aadfddc2b91a48824287a4ab2878
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/vc_mgr.c

index e9703c6..559a276 100755 (executable)
@@ -44,9 +44,9 @@
 
 #define VC_MANAGER_CONFIG_HANDLE       100000
 
-static Ecore_Timer* g_m_connect_timer = NULL;
-static Ecore_Idler* g_m_connect_idler = NULL;
-static int g_retry_connect_count = 0;
+static Ecore_Timer* g_send_hello_timer = NULL;
+static Ecore_Idler* g_request_init_timer = NULL;
+static int g_send_hello_count = 0;
 
 static Ecore_Timer* g_m_set_volume_timer = NULL;
 
@@ -361,15 +361,15 @@ int vc_mgr_deinitialize(void)
                __vc_mgr_internal_unprepare();
                /* no break. need to next step*/
        case VC_STATE_INITIALIZED:
-               if (NULL != g_m_connect_timer) {
+               if (NULL != g_send_hello_timer) {
                        SLOG(LOG_DEBUG, TAG_VCM, "Connect Timer is deleted");
-                       ecore_timer_del(g_m_connect_timer);
-                       g_m_connect_timer = NULL;
+                       ecore_timer_del(g_send_hello_timer);
+                       g_send_hello_timer = NULL;
                }
-               if (g_m_connect_idler) {
+               if (g_request_init_timer) {
                        SLOG(LOG_DEBUG, TAG_VCM, "Connect idler is deleted");
-                       ecore_idler_del(g_m_connect_idler);
-                       g_m_connect_idler = NULL;
+                       ecore_idler_del(g_request_init_timer);
+                       g_request_init_timer = NULL;
                }
 
                vc_config_mgr_unset_lang_cb(g_vc_m->handle + VC_MANAGER_CONFIG_HANDLE);
@@ -412,7 +412,7 @@ int vc_mgr_deinitialize(void)
        return VC_ERROR_NONE;
 }
 
-static Eina_Bool __vc_mgr_connect_daemon(void *data)
+static Eina_Bool __request_initialize(void *data)
 {
        /* request initialization */
        int ret = -1;
@@ -443,7 +443,7 @@ static Eina_Bool __vc_mgr_connect_daemon(void *data)
                        ecore_main_loop_thread_safe_call_async(__vc_mgr_notify_error, (void*)g_vc_m);
 
                        SLOG(LOG_DEBUG, TAG_VCM, "@@@");
-                       g_m_connect_idler = NULL;
+                       g_request_init_timer = NULL;
                        return EINA_FALSE;
 
                } else if (0 != ret) {
@@ -484,43 +484,43 @@ static Eina_Bool __vc_mgr_connect_daemon(void *data)
                }
        } else {
                SLOG(LOG_ERROR, TAG_VCM, "[Not ERROR] g_vc_m is not valid. It is destroyed."); //LCOV_EXCL_LINE
-               g_m_connect_idler = NULL;
+               g_request_init_timer = NULL;
                return EINA_FALSE;
        }
 
        SLOG(LOG_ERROR, TAG_VCM, "@@@");
 
-       g_m_connect_idler = NULL;
+       g_request_init_timer = NULL;
        return EINA_FALSE;
 }
 
 
-static Eina_Bool __vc_mgr_prepare_daemon(void *data)
+static Eina_Bool __send_hello_message(void *data)
 {
        /* Send hello */
        if (0 != vc_mgr_dbus_request_hello()) {
-               if (g_retry_connect_count == 20) {
-                       g_retry_connect_count = 0;
+               if (g_send_hello_count == 20) {
+                       g_send_hello_count = 0;
                        SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to request hello !! send error to manager");
                        __vc_mgr_cb_error(VC_ERROR_TIMED_OUT, -1, "voice_framework.error.vcfw.connect_engine_fail");
-                       g_m_connect_timer = NULL;
+                       g_send_hello_timer = NULL;
                        return EINA_FALSE;
                } else {
-                       g_retry_connect_count++;
+                       g_send_hello_count++;
                        return EINA_TRUE;
                }
        }
 
        SLOG(LOG_DEBUG, TAG_VCM, "===== [Manager] Connect daemon");
 
-       if (NULL == g_m_connect_idler) {
+       if (NULL == g_request_init_timer) {
                SLOG(LOG_INFO, TAG_VCM, "[DEBUG] Create a new idler for preparation");
-               g_m_connect_idler = ecore_idler_add(__vc_mgr_connect_daemon, NULL);
+               g_request_init_timer = ecore_idler_add(__request_initialize, NULL);
        } else {
                SLOG(LOG_INFO, TAG_VCM, "[INFO] idler handle is already created");
        }
 
-       g_m_connect_timer = NULL;
+       g_send_hello_timer = NULL;
        return EINA_FALSE;
 }
 
@@ -551,11 +551,11 @@ int vc_mgr_prepare(void)
                return VC_ERROR_INVALID_STATE;
        }
 
-       if (NULL == g_m_connect_timer) {
-               g_retry_connect_count = 0;
+       if (NULL == g_send_hello_timer) {
+               g_send_hello_count = 0;
                SLOG(LOG_INFO, TAG_VCM, "[DEBUG] Create a new timer for preparation");
                ecore_thread_main_loop_begin();
-               g_m_connect_timer = ecore_timer_add(0.02, __vc_mgr_prepare_daemon, NULL);
+               g_send_hello_timer = ecore_timer_add(0.02, __send_hello_message, NULL);
                ecore_thread_main_loop_end();
        } else {
                SLOG(LOG_INFO, TAG_VCM, "[INFO] timer handle is already created");