GetAll() ignores the interface passed in the D-Bus message because lookup_object_and_method() returns the last object_info in the object's info list if there wasn't a matching method on the object. for (info_list_walk = info_list; info_list_walk != NULL; info_list_walk = g_list_next (info_list_walk)) { info = (DBusGObjectInfo *) info_list_walk->data; *object_ret = info; for (i = 0; i < info->n_method_infos; i++) { const char *expected_member; const char *expected_interface; char *expected_signature; const DBusGMethodInfo *method; method = &(info->method_infos[i]); /* Check method interface/name and input signature */ expected_interface = method_interface_from_object_info (*object_ret, method); expected_member = method_name_from_object_info (*object_ret, method); expected_signature = method_input_signature_from_object_info (*object_ret, method); if ((interface == NULL || strcmp (expected_interface, interface) == 0) && strcmp (expected_member, member) == 0 && strcmp (expected_signature, signature) == 0) { g_free (expected_signature); *method_ret = method; g_list_free (info_list); return TRUE; } g_free (expected_signature); } } Thus, for GetAll(), unless an interface of the object itself provides GetAll(), the last object info in the list will always be returned, which might well be incorrect.
Created attachment 21269 [details] [review] Proposed patch
I believe David wrote the GetAll code, adding him.
I was doing patch too. But I like yours more. The testcases I wrote should still apply regardless of which patch gets committed.
Created attachment 21279 [details] [review] testcases for GetAll with interfaces
Pushed both patches, thanks! commit d55ffa5bbccd027caf7f2e7376b555e397a7ac3c Author: Dan Williams <dcbw@redhat.com> Date: Thu Dec 18 13:09:33 2008 -0500 Bug 19145: test cases for GetAll Add test cases for GetAll. Signed-off-by: Colin Walters <walters@verbum.org> commit 94d68f00d9d244de3b1d66d3cf78bb5171552311 Author: Tambet Ingo <tambet@gmail.com> Date: Thu Dec 18 12:09:43 2008 +0200 Use the provided interface for org.freedesktop.DBus.Properties.GetAll call.
Colin; looks like the new testcase files in test/core/ didn't get added to the repo: test/core/test-service-glib-subclass.xml test/core/my-object-subclass.c test/core/my-object-subclass.h
commit 88684866d06df99f89b30a07e4809369b4cb0453 Author: Colin Walters <walters@verbum.org> Date: Fri Dec 19 11:18:26 2008 -0500 Add new files missed from last commit
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.