Merge changes I0deb6ab7,Ib8183f9d into tizen accepted/tizen/ivi/20160218.024220 accepted/tizen/mobile/20160127.002930 accepted/tizen/tv/20160127.002951 accepted/tizen/wearable/20160127.003015 submit/tizen/20160126.081830 submit/tizen_common/20160218.142243 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000004
authorWonnam Jang <wn.jang@samsung.com>
Tue, 26 Jan 2016 08:10:59 +0000 (00:10 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 26 Jan 2016 08:11:00 +0000 (00:11 -0800)
* changes:
  Fix dbus bug about conn block
  Fix lib path for 64bit

CMakeLists.txt
client/vc_mgr_dbus.c
common/vc_defs.h
org.tizen.voice.vcserver.service
packaging/voice-control.spec
server/vcd_dbus.c
vc-server.conf

index d978245..46927e8 100644 (file)
@@ -28,6 +28,8 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(EXEC_PREFIX "${PREFIX}")
 SET(VERSION 0.2.10)
 
+ADD_DEFINITIONS("-DVOICE_LIBDIR=\"${LIBDIR}\"")
+
 # pkg config tool
 INCLUDE(FindPkgConfig)
 
@@ -55,3 +57,5 @@ ADD_SUBDIRECTORY(server)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-config.xml DESTINATION /usr/share/voice/vc/)
 
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.vcserver.service DESTINATION /usr/share/dbus-1/services)
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-server.conf DESTINATION /etc/dbus-1/session.d)
\ No newline at end of file
index ae38429..164e1a4 100644 (file)
@@ -422,7 +422,7 @@ int vc_mgr_dbus_open_connection()
        dbus_error_init(&err);
 
        /* connect to the DBUS system bus, and check for errors */
-       g_m_conn_sender = dbus_bus_get(DBUS_BUS_SESSION, &err);
+       g_m_conn_sender = dbus_bus_get_private(DBUS_BUS_SESSION, &err);
 
        if (dbus_error_is_set(&err)) {
                SLOG(LOG_ERROR, TAG_VCM, "Dbus Connection Error (%s)", err.message);
@@ -435,7 +435,7 @@ int vc_mgr_dbus_open_connection()
        }
 
        /* connect to the DBUS system bus, and check for errors */
-       g_m_conn_listener = dbus_bus_get(DBUS_BUS_SESSION, &err);
+       g_m_conn_listener = dbus_bus_get_private(DBUS_BUS_SESSION, &err);
 
        if (dbus_error_is_set(&err)) {
                SLOG(LOG_ERROR, TAG_VCM, "Dbus Connection Error (%s)", err.message);
index c591038..79e15b9 100644 (file)
@@ -145,7 +145,7 @@ extern "C" {
 #define VC_CONFIG_BASE                 tzplatform_mkpath(TZ_USER_HOME, "share/.voice")
 #define VC_CONFIG                      tzplatform_mkpath(TZ_USER_HOME, "share/.voice/vc-config.xml")
 
-#define VC_DEFAULT_ENGINE_INFO         "/usr/lib/voice/vc/1.0/engine-info"
+#define VC_DEFAULT_ENGINE_INFO         VOICE_LIBDIR"/voice/vc/1.0/engine-info"
 
 #define VC_NO_FOREGROUND_PID           0
 
index 6fd1b9b..a6f1e01 100644 (file)
@@ -1,4 +1,3 @@
 [D-BUS Service]
 Name=org.tizen.voice.vcserver
 Exec=/usr/bin/vc-daemon
-
index 575da96..8ebf9da 100644 (file)
@@ -111,6 +111,7 @@ mkdir -p /usr/share/voice/vc
 %{_libdir}/libvc_manager.so
 %{_bindir}/vc-daemon
 /usr/share/dbus-1/services/org.tizen.voice*
+/etc/dbus-1/session.d/vc-server.conf
 /usr/share/voice/vc/vc-config.xml
 /usr/share/license/%{name}
 
index 49f5fa7..0b03140 100644 (file)
@@ -174,6 +174,7 @@ int vcdc_send_set_volume(int manger_pid, float volume)
 
        if (1 != dbus_connection_send(g_conn_sender, msg, NULL)) {
                SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Fail to Send");
+               dbus_message_unref(msg);
                return -1;
        } else {
                SLOG(LOG_DEBUG, TAG_VCD, "<<<< Send set volume : pid(%d), volume(%f)", manger_pid, volume);
@@ -528,7 +529,7 @@ int vcd_dbus_open_connection()
        int ret;
 
        /* Create connection for sender */
-       g_conn_sender = dbus_bus_get(DBUS_BUS_SESSION, &err);
+       g_conn_sender = dbus_bus_get_private(DBUS_BUS_SESSION, &err);
 
        if (dbus_error_is_set(&err)) {
                SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Fail dbus_bus_get : %s", err.message);
@@ -541,7 +542,7 @@ int vcd_dbus_open_connection()
        }
 
        /* connect to the bus and check for errors */
-       g_conn_listener = dbus_bus_get(DBUS_BUS_SESSION, &err);
+       g_conn_listener = dbus_bus_get_private(DBUS_BUS_SESSION, &err);
 
        if (dbus_error_is_set(&err)) {
                SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Fail dbus_bus_get : %s", err.message);
index ded4aef..58c306e 100644 (file)
@@ -3,95 +3,46 @@
 <busconfig>
 
 <!-- root can own the service -->
-  <policy user="default">
-    <allow own_prefix="org.tizen.voice.vcclient"/>
-    <allow send_destination="org.tizen.voice.vcclient"/>
-    <allow receive_sender="org.tizen.voice.vcclient"/>
-  </policy>
-
   <policy user="root">
     <allow own_prefix="org.tizen.voice.vcclient"/>
     <allow send_destination="org.tizen.voice.vcclient"/>
     <allow receive_sender="org.tizen.voice.vcclient"/>
   </policy>
-
   <policy context="default">
     <allow own_prefix="org.tizen.voice.vcclient"/>
     <allow send_destination="org.tizen.voice.vcclient"/>
     <allow receive_sender="org.tizen.voice.vcclient"/>
   </policy>
-
   
-  <policy user="default">
-    <allow own_prefix="org.tizen.voice.vcwidget"/>
-    <allow send_destination="org.tizen.voice.vcwidget"/>
-    <allow receive_sender="org.tizen.voice.vcwidget"/>
-  </policy>
-
   <policy user="root">
     <allow own_prefix="org.tizen.voice.vcwidget"/>
     <allow send_destination="org.tizen.voice.vcwidget"/>
     <allow receive_sender="org.tizen.voice.vcwidget"/>
   </policy>
-
   <policy context="default">
     <allow own_prefix="org.tizen.voice.vcwidget"/>
     <allow send_destination="org.tizen.voice.vcwidget"/>
     <allow receive_sender="org.tizen.voice.vcwidget"/>
   </policy>
 
-    
-  <policy user="default">
-    <allow own_prefix="org.tizen.voice.vcmanager"/>
-    <allow send_destination="org.tizen.voice.vcmanager"/>
-    <allow receive_sender="org.tizen.voice.vcmanager"/>
-  </policy>
-
   <policy user="root">
     <allow own_prefix="org.tizen.voice.vcmanager"/>
     <allow send_destination="org.tizen.voice.vcmanager"/>
     <allow receive_sender="org.tizen.voice.vcmanager"/>
   </policy>
-
   <policy context="default">
     <allow own_prefix="org.tizen.voice.vcmanager"/>
     <allow send_destination="org.tizen.voice.vcmanager"/>
     <allow receive_sender="org.tizen.voice.vcmanager"/>
   </policy>
-    
-
-  <policy user="default">
-    <allow own="org.tizen.voice.vcserver"/>
-    <allow send_destination="org.tizen.voice.vcserver"/>
-    <allow receive_sender="org.tizen.voice.vcserver"/>
-  </policy>
 
   <policy user="root">
     <allow own="org.tizen.voice.vcserver"/>
     <allow send_destination="org.tizen.voice.vcserver"/>
     <allow receive_sender="org.tizen.voice.vcserver"/>
   </policy>
-  
-  <policy user="system">
-    <allow own="org.tizen.voice.vcserver"/>
-    <allow send_destination="org.tizen.voice.vcserver"/>
-    <allow receive_sender="org.tizen.voice.vcserver"/>
-  </policy>
-  
-  
-  <!--
-  <policy context="default">
-    <check send_destination="org.tizen.voice.vcserver"
-    send_interface="org.tizen.voice.vcserver"
-    privilege="(n/a)" />
-  </policy>
-  -->
-  
-  <!--
   <policy context="default">
-    <check send_destination="org.tizen.voice.vcserver"
-    send_interface="org.tizen.voice.vcserver"
-    privilege="http://tizen.org/privilege/recorder" />
+    <allow send_destination="org.tizen.voice.vcserver"
+           send_interface="org.tizen.voice.vcserver"/>
   </policy>
-  -->
 </busconfig>