From: Wonnam Jang Date: Fri, 20 Oct 2017 01:51:23 +0000 (+0900) Subject: Add to set false as exit when dbus disconnects X-Git-Tag: accepted/tizen/unified/20180228.071746~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9132be37d293949d402384952e5793f9997d80b;p=platform%2Fcore%2Fuifw%2Fvoice-control.git Add to set false as exit when dbus disconnects Change-Id: I7966ef43d27f65111798a8f86797d32765678695 Signed-off-by: Wonnam Jang --- diff --git a/client/vc_dbus.c b/client/vc_dbus.c index 7e69069..49d4510 100644 --- a/client/vc_dbus.c +++ b/client/vc_dbus.c @@ -225,6 +225,8 @@ int vc_dbus_open_connection() return VC_ERROR_OPERATION_FAILED; } + dbus_connection_set_exit_on_disconnect(g_conn_sender, false); + g_conn_listener = dbus_bus_get_private(DBUS_BUS_SESSION, &err); if (dbus_error_is_set(&err)) { @@ -238,6 +240,8 @@ int vc_dbus_open_connection() return VC_ERROR_OPERATION_FAILED; } + dbus_connection_set_exit_on_disconnect(g_conn_listener, false); + int pid = getpid(); char service_name[64]; @@ -1568,4 +1572,4 @@ int vc_dbus_request_auth_cancel(int pid, int mgr_pid) } return result; -} \ No newline at end of file +} diff --git a/client/vc_mgr_dbus.c b/client/vc_mgr_dbus.c index a552504..2cfd533 100644 --- a/client/vc_mgr_dbus.c +++ b/client/vc_mgr_dbus.c @@ -628,6 +628,8 @@ int vc_mgr_dbus_open_connection() return VC_ERROR_OPERATION_FAILED; } + dbus_connection_set_exit_on_disconnect(g_m_conn_sender, false); + /* connect to the DBUS system bus, and check for errors */ g_m_conn_listener = dbus_bus_get_private(DBUS_BUS_SESSION, &err); @@ -642,6 +644,8 @@ int vc_mgr_dbus_open_connection() return VC_ERROR_OPERATION_FAILED; } + dbus_connection_set_exit_on_disconnect(g_m_conn_listener, false); + SLOG(LOG_DEBUG, TAG_VCM, "service name is %s", VC_MANAGER_SERVICE_NAME); /* register our name on the bus, and check for errors */ diff --git a/client/vc_widget_dbus.c b/client/vc_widget_dbus.c index adebea1..a40fd93 100644 --- a/client/vc_widget_dbus.c +++ b/client/vc_widget_dbus.c @@ -300,6 +300,8 @@ int vc_widget_dbus_open_connection() return VC_ERROR_OPERATION_FAILED; } + dbus_connection_set_exit_on_disconnect(g_w_conn_sender, false); + g_w_conn_listener = dbus_bus_get_private(DBUS_BUS_SESSION, &err); if (dbus_error_is_set(&err)) { @@ -313,6 +315,8 @@ int vc_widget_dbus_open_connection() return VC_ERROR_OPERATION_FAILED; } + dbus_connection_set_exit_on_disconnect(g_w_conn_listener, false); + int pid = getpid(); char service_name[64]; diff --git a/server/vcd_dbus.c b/server/vcd_dbus.c index 0f05eed..f2486e4 100755 --- a/server/vcd_dbus.c +++ b/server/vcd_dbus.c @@ -1089,6 +1089,8 @@ int vcd_dbus_open_connection() return VCD_ERROR_OPERATION_FAILED; } + dbus_connection_set_exit_on_disconnect(g_conn_sender, false); + /* connect to the bus and check for errors */ g_conn_listener = dbus_bus_get_private(DBUS_BUS_SESSION, &err); @@ -1102,6 +1104,8 @@ int vcd_dbus_open_connection() return VCD_ERROR_OPERATION_FAILED; } + dbus_connection_set_exit_on_disconnect(g_conn_listener, false); + /* request our name on the bus and check for errors */ ret = dbus_bus_request_name(g_conn_listener, VC_SERVER_SERVICE_NAME, DBUS_NAME_FLAG_REPLACE_EXISTING, &err);