kdbus: always use well-known names for proxy 72/86072/1
authorLukasz Skalski <l.skalski@samsung.com>
Mon, 29 Aug 2016 14:17:54 +0000 (16:17 +0200)
committerLukasz Skalski <l.skalski@samsung.com>
Mon, 29 Aug 2016 14:17:54 +0000 (16:17 +0200)
commit429a73993572cf22533458e9fa031a14be0e5d00
tree71e479326fc834d1205c67f9abcdcc0bc691bb66
parent5382517c25a21618585fd1c7614bab3a40b2cd1d
kdbus: always use well-known names for proxy

If proxy->priv->name is a well-known name (what just means that we
created proxy for well-known name) then proxy->priv->name_owner points
to current name owner (unique id or NULL if name currently doesn't have
any owner). If we have following scenario:

1) server termination
2) g_dbus_proxy_call() to server
    2a) get_destination_for_call()
3) on_name_owner callback, which set proxy->priv->name_owner to NULL

then get_destination_for_call() function will return
proxy->priv->name_owner value (which is unique id of previous name
owner). To avoid above race condition it will be better if we 'always'
return well-known name (without checking name_owner value).

Change-Id: I31f7edb56d8434e26a15efe260c1b737486da93e
gio/gdbusproxy.c