summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINSUN PYO <insun.pyo@samsung.com>2017-03-23 16:49:21 +0900
committerINSUN PYO <insun.pyo@samsung.com>2017-03-26 18:42:24 -0700
commitefb4336bb882bcc8a561aae3d74574fa5df19750 (patch)
tree092255cb91f610feb07accd3a507616a054b551b
parenta31a805276086ead48672248cac8d2da4c373d37 (diff)
downloaddbus-efb4336bb882bcc8a561aae3d74574fa5df19750.tar.gz
dbus-efb4336bb882bcc8a561aae3d74574fa5df19750.tar.bz2
dbus-efb4336bb882bcc8a561aae3d74574fa5df19750.zip
For disconnection connections, _dbus_connection_get_dispatch_status_unlocked always returns DBUS_DISPATCH_DATA_REMAINS. So __bus_loop_dispatch is going around in an infinite loop. If _dbus_loop_dispatch is out of the loop, _dbus_connection_get_dispatch_status_unlocked returns DBUS_DISPATCH_COMPLETE as normal. It is dead-lock. ====================== reproduce ================== su - owner dbus-send --type=method_call --system --dest=org.tizen.system.deviced /Org/Tizen/System/DeviceD/Display org.tizen.system.deviced.display.CustomBrightness dbus-send --type=method_call --system --dest=org.tizen.system.deviced /Org/Tizen/System/DeviceD/Display org.tizen.system.deviced.display.CustomBrightness dbus-send --type=method_call --system --dest=org.tizen.system.deviced /Org/Tizen/System/DeviceD/Display org.tizen.system.deviced.display.CustomBrightness dbus-send --type=method_call --system --dest=org.tizen.system.deviced /Org/Tizen/System/DeviceD/Display org.tizen.system.deviced.display.CustomBrightness dbus-send --type=method_call --system --dest=org.tizen.system.deviced /Org/Tizen/System/DeviceD/Display org.tizen.system.deviced.display.CustomBrightness =================================================== Signed-off-by: INSUN PYO <insun.pyo@samsung.com> Change-Id: I8565a757a62b50a27d2c6b6931e125af452ff74e (cherry picked from commit 30f31f92bbe969e88386ac484061e715837d6aca)
-rw-r--r--dbus/dbus-connection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
index 9a5be336..4537edd2 100644
--- a/dbus/dbus-connection.c
+++ b/dbus/dbus-connection.c
@@ -4381,7 +4381,7 @@ static DBusDispatchStatus
_dbus_connection_get_dispatch_status_unlocked (DBusConnection *connection)
{
HAVE_LOCK_CHECK (connection);
- if (connection->dispatch_disabled && dbus_connection_get_is_connected(connection))
+ if (connection->dispatch_disabled)
return DBUS_DISPATCH_COMPLETE;
else if (connection->n_incoming > 0)
return DBUS_DISPATCH_DATA_REMAINS;