Return an error for calls into unknown interfaces or unknown objects

Ryan pointed out on IRC that we didn't do anything here. Looking at
the code, it's painfully obvious that we should be returning an error
here since a comment already says that we've exhausted all possible
options.

Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
David Zeuthen
2010-05-21 12:09:27 -04:00
parent c7f0f2c437
commit bf24dff88e
2 changed files with 21 additions and 1 deletions

View File

@@ -824,6 +824,18 @@ test_dispatch_thread_func (gpointer user_data)
g_error_free (error);
g_assert (value == NULL);
error = NULL;
value = g_dbus_proxy_call_sync (foo_proxy,
"org.example.FooXYZ.NonExistant",
NULL,
G_DBUS_CALL_FLAGS_NONE,
-1,
NULL,
&error);
g_assert_error (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD);
g_error_free (error);
g_assert (value == NULL);
/* user properties */
error = NULL;
value = g_dbus_proxy_call_sync (foo_proxy,