Add logs when successing on Dbus_no_reply 61/220061/1
authorwn.jang <wn.jang@samsung.com>
Thu, 12 Dec 2019 23:44:41 +0000 (08:44 +0900)
committerwn.jang <wn.jang@samsung.com>
Thu, 12 Dec 2019 23:44:41 +0000 (08:44 +0900)
Change-Id: Id9ce61de7510cf5a2fbd461a68be25cbd75fab3f

client/vc_dbus.c
client/vc_mgr_dbus.c
client/vc_widget_dbus.c

index c78d5db..e41b7ef 100644 (file)
@@ -929,12 +929,12 @@ int vc_dbus_set_foreground(int pid, bool value)
                SLOG(LOG_ERROR, TAG_VCC, "[Dbus ERROR] Fail to Send"); //LCOV_EXCL_LINE
                dbus_message_unref(msg);
                return VC_ERROR_OPERATION_FAILED;
+       } else {
+               SLOG(LOG_INFO, TAG_VCC, "[Dbus DEBUG] Success to Send");
+               dbus_connection_flush(g_conn_sender);
        }
 
-       dbus_connection_flush(g_conn_sender);
-
        dbus_message_unref(msg);
-
        return 0;
 }
 
@@ -1050,7 +1050,7 @@ int vc_dbus_request_dialog(int pid, const char* disp_text, const char* utt_text,
                dbus_message_unref(msg);
                return VC_ERROR_OPERATION_FAILED;
        } else {
-               SLOG(LOG_DEBUG, TAG_VCC, "[Dbus DEBUG] Success to Send");
+               SLOG(LOG_INFO, TAG_VCC, "[Dbus DEBUG] Success to Send");
                dbus_connection_flush(g_conn_sender);
        }
 
index ab64df0..1750069 100644 (file)
@@ -1832,16 +1832,17 @@ int vc_mgr_dbus_request_do_action(int pid, vc_send_event_type_e type, char* send
 
        dbus_message_set_no_reply(msg, TRUE);
 
+       /* send the message and flush the connection */
        if (1 != dbus_connection_send(g_m_conn_sender, msg, NULL)) {
                SLOG(LOG_ERROR, TAG_VCM, "[Dbus ERROR] Fail to Send");
                dbus_message_unref(msg);
-               return -1;
+               return VC_ERROR_OPERATION_FAILED;
        } else {
                SLOG(LOG_INFO, TAG_VCM, "[Dbus] SUCCESS Send");
                dbus_connection_flush(g_m_conn_sender);
        }
-       dbus_message_unref(msg);
 
+       dbus_message_unref(msg);
        return 0;
 }
 
@@ -2320,16 +2321,16 @@ int vc_mgr_dbus_send_result(int pid, int cmd_type, int result_id)
        dbus_message_set_no_reply(msg, TRUE);
 
        /* send the message and flush the connection */
-       if (!dbus_connection_send(g_m_conn_sender, msg, NULL)) {
-               SLOG(LOG_ERROR, TAG_VCM, "[Dbus ERROR] Fail to send result message");
+       if (1 != dbus_connection_send(g_m_conn_sender, msg, NULL)) {
+               SLOG(LOG_ERROR, TAG_VCM, "[Dbus ERROR] Fail to Send");
+               dbus_message_unref(msg);
+               return VC_ERROR_OPERATION_FAILED;
        } else {
-               SLOG(LOG_INFO, TAG_VCM, "[Dbus] Success to send result");
-
+               SLOG(LOG_INFO, TAG_VCM, "[Dbus] SUCCESS Send");
                dbus_connection_flush(g_m_conn_sender);
        }
 
        dbus_message_unref(msg);
-
        return 0;
 }
 
@@ -2361,14 +2362,17 @@ int vc_mgr_dbus_send_result_selection(int pid)
 
        dbus_message_set_no_reply(msg, TRUE);
 
+       /* send the message and flush the connection */
        if (1 != dbus_connection_send(g_m_conn_sender, msg, NULL)) {
                SLOG(LOG_ERROR, TAG_VCM, "[Dbus ERROR] Fail to Send");
-               return -1;
+               dbus_message_unref(msg);
+               return VC_ERROR_OPERATION_FAILED;
        } else {
                SLOG(LOG_INFO, TAG_VCM, "[Dbus] SUCCESS Send");
                dbus_connection_flush(g_m_conn_sender);
        }
 
+       dbus_message_unref(msg);
        return 0;
 }
 
@@ -2403,16 +2407,17 @@ int vc_mgr_dbus_send_specific_engine_request(int pid, const char* engine_app_id,
 
        dbus_message_set_no_reply(msg, TRUE);
 
+       /* send the message and flush the connection */
        if (1 != dbus_connection_send(g_m_conn_sender, msg, NULL)) {
                SLOG(LOG_ERROR, TAG_VCM, "[Dbus ERROR] Fail to Send");
                dbus_message_unref(msg);
-               return -1;
+               return VC_ERROR_OPERATION_FAILED;
        } else {
                SLOG(LOG_INFO, TAG_VCM, "[Dbus] SUCCESS Send");
                dbus_connection_flush(g_m_conn_sender);
        }
-       dbus_message_unref(msg);
 
+       dbus_message_unref(msg);
        return 0;
 }
 
@@ -2439,16 +2444,17 @@ int vc_mgr_dbus_send_utterance_status(int pid, int utt_id, int utt_status)
 
        dbus_message_set_no_reply(msg, TRUE);
 
+       /* send the message and flush the connection */
        if (1 != dbus_connection_send(g_m_conn_sender, msg, NULL)) {
                SLOG(LOG_ERROR, TAG_VCM, "[Dbus ERROR] Fail to Send");
                dbus_message_unref(msg);
-               return -1;
+               return VC_ERROR_OPERATION_FAILED;
        } else {
                SLOG(LOG_INFO, TAG_VCM, "[Dbus] SUCCESS Send");
                dbus_connection_flush(g_m_conn_sender);
        }
-       dbus_message_unref(msg);
 
+       dbus_message_unref(msg);
        return 0;
 }
 
index eddeb77..0ddb340 100644 (file)
@@ -825,14 +825,16 @@ int vc_widget_dbus_set_foreground(int pid, bool value)
 
        dbus_message_set_no_reply(msg, TRUE);
 
+       /* send the message and flush the connection */
        if (1 != dbus_connection_send(g_w_conn_sender, msg, NULL)) {
                SLOG(LOG_ERROR, TAG_VCW, "[Dbus ERROR] Fail to Send");
                dbus_message_unref(msg);
                return VC_ERROR_OPERATION_FAILED;
+       } else {
+               SLOG(LOG_INFO, TAG_VCW, "[Dbus] SUCCESS Send");
+               dbus_connection_flush(g_w_conn_sender);
        }
 
-       dbus_connection_flush(g_w_conn_sender);
-
        dbus_message_unref(msg);
 
        return 0;