GDBusConnection: be more careful with async GetAll
authorRyan Lortie <desrt@desrt.ca>
Mon, 1 Jul 2013 21:42:43 +0000 (17:42 -0400)
committerRyan Lortie <desrt@desrt.ca>
Tue, 2 Jul 2013 03:36:30 +0000 (23:36 -0400)
commitcb4469600c5146a48501a31e9a3fb9bfc261477d
tree2fc68c60f77cf0e598046077e95e11dca2b480b5
parent3cefb7248affdf92c878520f54bcaa3993d9b2fc
GDBusConnection: be more careful with async GetAll

It's possible to get a org.freedesktop.Properties.GetAll call even if we
have no readable properties in the introspection, in which case we
should return the empty list in the usual way.

We should certainly _not_ be dispatching to the method call handler of
an interface which has no properties (since it will not be expecting
this).

Add a check to make sure that there is at least one readable property
before assuming that a NULL get_property handler implies that we want to
handle properties asynchronously.

Add a testcase that was failing before the change and works after it.

https://bugzilla.gnome.org/show_bug.cgi?id=703437
gio/gdbusconnection.c
gio/tests/gdbus-export.c