GDBusProxy: if a well-known name is not owned, don't GetAll from the dbus-daemon
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 15 Aug 2011 14:57:59 +0000 (15:57 +0100)
committerDavid Zeuthen <davidz@redhat.com>
Mon, 15 Aug 2011 16:49:58 +0000 (12:49 -0400)
commit20387d262ff104f9de3defc264c5c2010d272857
tree3734e2aff98dd4faca2255fc65dc52d4ac3c118e
parent2b0171a8080c233f85c1d66fa6df6d75640b37e5
GDBusProxy: if a well-known name is not owned, don't GetAll from the dbus-daemon

If you run:

    ( cd gio/tests && G_DBUS_DEBUG=all ./gdbus-proxy-well-known-name )

you can see that in the case where the name com.example.TestService isn't
owned yet, the GDBusProxy calls GetAll() with no destination, resulting
in an error reply from the peer (the dbus-daemon itself). That's clearly
not right!

However, if priv->name is NULL, that indicates the special case where we
really do want to talk directly to a peer, instead of via the bus daemon
(most likely to be used on peer-to-peer connections); in that special
case, do call GetAll().

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gdbusproxy.c