GDBusProxy: Call into well-known name if no name owner currently exists
authorDavid Zeuthen <davidz@redhat.com>
Wed, 18 Aug 2010 15:35:25 +0000 (11:35 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Wed, 18 Aug 2010 15:35:25 +0000 (11:35 -0400)
commit5bb94348f4760352f6ae974002db48cb130343a4
tree529d2e7259ea373475c9a02a4f445c4866393402
parentc2945808acc09562fad0ecd1247fcc3e53eeb913
GDBusProxy: Call into well-known name if no name owner currently exists

This is really what (API) users expect from GDBusProxy - in
particular, mclasen and I ran into this problem while debugging a
upower issue, see

 https://bugzilla.redhat.com/show_bug.cgi?id=624125

In a nutshell, the problem is that polkitd crashes while upower holds
a PolkitAuthority object (which in turns contains a GDBusProxy for the
well-known name org.freedesktop.PolicyKit1). This means that
subsequent calls on the PolkitAuthority (which is translated into
calls into the GDBusProxy) fails since :g-name-owner is NULL.

With this fix, we'll be requesting the bus daemon to launch polkitd
since we will start calling into org.freedesktop.PolicyKit1 as soon as
we notice that there is no owner for this name.

Unfortunately our test suite doesn't cover service activation so there
is no way to reliably test this. I will file a bug about this.

Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gdbusproxy.c