cynara: add exception code for disconnection code. 71/120571/3 accepted/tizen/common/20170327.142517 accepted/tizen/ivi/20170327.052332 accepted/tizen/mobile/20170327.052243 accepted/tizen/tv/20170327.052301 accepted/tizen/unified/20170327.052349 accepted/tizen/wearable/20170327.052316 submit/tizen/20170327.014124
authorINSUN PYO <insun.pyo@samsung.com>
Thu, 23 Mar 2017 07:49:21 +0000 (16:49 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Fri, 24 Mar 2017 07:25:43 +0000 (16:25 +0900)
commit30f31f92bbe969e88386ac484061e715837d6aca
tree92f5772f95f8ce93f8b17e888078c5d41a5c8297
parent05272cd016d8b0a218aff1cb66af9dcd651bcfe0
cynara: add exception code for disconnection code.

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
dbus/dbus-connection.c