Fix typo in CMakeLists.txt and stt.spec
[platform/core/uifw/stt.git] / server / sttd_dbus.c
index f6aa112..b30a35a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2011-2014 Samsung Electronics Co., Ltd All Rights Reserved
+* Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
@@ -384,6 +384,12 @@ static Eina_Bool listener_event_callback(void* data, Ecore_Fd_Handler *fd_handle
        else if (dbus_message_is_method_call(msg, STT_SERVER_SERVICE_INTERFACE, STT_METHOD_GET_CURRENT_LANG))
                sttd_dbus_server_get_default_lang(g_conn_listener, msg);
 
+       else if (dbus_message_is_method_call(msg, STT_SERVER_SERVICE_INTERFACE, STT_METHOD_SET_PRIVATE_DATA))
+               sttd_dbus_server_set_private_data(g_conn_listener, msg);
+
+       else if (dbus_message_is_method_call(msg, STT_SERVER_SERVICE_INTERFACE, STT_METHOD_GET_PRIVATE_DATA))
+               sttd_dbus_server_get_private_data(g_conn_listener, msg);
+
        else if (dbus_message_is_method_call(msg, STT_SERVER_SERVICE_INTERFACE, STT_METHOD_IS_TYPE_SUPPORTED))
                sttd_dbus_server_is_recognition_type_supported(g_conn_listener, msg);
 
@@ -509,8 +515,13 @@ int sttd_dbus_close_connection()
        dbus_connection_close(g_conn_listener);
        dbus_connection_close(g_conn_sender);
 
+       dbus_connection_unref(g_conn_sender);
+       dbus_connection_unref(g_conn_listener);
+
        g_conn_listener = NULL;
        g_conn_sender = NULL;
 
+       SLOG(LOG_DEBUG, TAG_STTD, "[Server] Close dbus connection");
+
        return 0;
 }