diff options
author | Søren Sandmann Pedersen <ssp@dhcp-100-2-40.bos.redhat.com> | 2009-04-12 15:59:13 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@dhcp-100-2-40.bos.redhat.com> | 2009-04-12 15:59:13 -0400 |
commit | 85f4a3cd9d01eef1b280fc17f392612fb960fd45 (patch) | |
tree | ade8cc170c689a0baf1f7ae0dd76a103fb1e321a | |
parent | 4daacc3db721e0fd2f0190d0d6fca14a36e479f2 (diff) |
Clearer warnings
-rw-r--r-- | dbus.c | 27 |
1 files changed, 23 insertions, 4 deletions
@@ -533,6 +533,9 @@ invoke (DBusConnection *connection, DBusMessage *error_reply; nul_arg_t result; int i; + + if (!member->function) + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; /* Add the data pointer */ args[0].v_pointer = object->data; @@ -1229,13 +1232,29 @@ nul_dbus_invoke (nul_dbus_service_t *service, return; object = find_object (service, object_str); + + if (!object) + { + g_critical ("Object '%s' not found", object_str); + return; + } + interface = find_interface (object, interface_str); + + if (!interface) + { + g_critical ("Interface '%s' not found", interface_str); + return; + } + method = find_member (interface, method_str); - g_return_if_fail (object != NULL); - g_return_if_fail (interface != NULL); - g_return_if_fail (method != NULL); - + if (!method) + { + g_critical ("Method '%s' not found", method_str); + return; + } + message = dbus_message_new_method_call ( service->name, object->name, interface->name, method->name); |