Use secure log to write result for security
[platform/core/uifw/stt.git] / server / sttd_dbus.c
index 768ce83..b7566c3 100644 (file)
@@ -315,7 +315,7 @@ int sttdc_send_result(int uid, int event, const char** data, int data_count, con
        SLOG(LOG_DEBUG, TAG_STTD, "[Dbus] result size (%d)", data_count);
        for (i = 0; i < data_count; i++) {
                if (NULL != data[i]) {
-                       SLOG(LOG_DEBUG, TAG_STTD, "[Dbus] result (%d, %s)", i, data[i]);
+                       SECURE_SLOG(LOG_DEBUG, TAG_STTD, "[Dbus] result (%d, %s)", i, data[i]);
 
                        if (!dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &data[i])) {
                                SLOG(LOG_ERROR, TAG_STTD, "[Dbus] response message : Fail to append result data");
@@ -504,17 +504,14 @@ void __sttd_dbus_connection_free()
 {
        if (NULL != g_conn_listener) {
                dbus_connection_close(g_conn_listener);
-               dbus_connection_unref(g_conn_listener);
                g_conn_listener = NULL;
        }
        if (NULL != g_conn_sender) {
                dbus_connection_close(g_conn_sender);
-               dbus_connection_unref(g_conn_sender);
                g_conn_sender = NULL;
        }
        if (NULL != g_conn_custom) {
                dbus_connection_close(g_conn_custom);
-               dbus_connection_unref(g_conn_custom);
                g_conn_custom = NULL;
        }
 }
@@ -656,8 +653,8 @@ int __sttd_request_custom_dbus_name()
        }
 
        if (NULL == g_conn_custom) {
-               SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to get dbus connection");
-               return STT_ERROR_OPERATION_FAILED;
+               SLOG(LOG_ERROR, TAG_STTD, "[ERROR] fail to get dbus connection");
+               return STTD_ERROR_OPERATION_FAILED;
        }
 
        dbus_connection_set_exit_on_disconnect(g_conn_custom, false);
@@ -685,7 +682,6 @@ int __sttd_request_custom_dbus_name()
        }
 
        dbus_connection_close(g_conn_custom);
-       dbus_connection_unref(g_conn_custom);
        g_conn_custom = NULL;
 
        SLOG(LOG_DEBUG, TAG_STTD, "==");