summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-error.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2006-04-24 19:13:15 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2006-04-24 19:13:15 +0000
commit14c47b9e49311149a56553c71286aaabd6bd2992 (patch)
tree3cc641577a01538b9d8d0f0d80723ef838a2c049 /hcid/dbus-error.c
parent40448f0abe91bdbf79ac52a1293251f66ee0f84c (diff)
Changed object path hierarchy
Diffstat (limited to 'hcid/dbus-error.c')
-rw-r--r--hcid/dbus-error.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/hcid/dbus-error.c b/hcid/dbus-error.c
index bcd1b109..8b75efeb 100644
--- a/hcid/dbus-error.c
+++ b/hcid/dbus-error.c
@@ -48,11 +48,19 @@ DBusHandlerResult error_invalid_arguments(DBusConnection *conn, DBusMessage *msg
"Invalid arguments"));
}
-DBusHandlerResult error_not_implemented(DBusConnection *conn, DBusMessage *msg)
+DBusHandlerResult error_unknown_method(DBusConnection *conn, DBusMessage *msg)
{
+ char error[128];
+ const char *signature = dbus_message_get_signature(msg);
+ const char *method = dbus_message_get_member(msg);
+ const char *interface = dbus_message_get_interface(msg);
+
+ snprintf(error, 128, "Method \"%s\" with signature \"%s\" on interface \"%s\" doesn't exist",
+ method, signature, interface);
+
return send_reply_and_unref(conn,
- dbus_message_new_error(msg, ERROR_INTERFACE ".NotImplemented",
- "Not implemented"));
+ dbus_message_new_error(msg, ERROR_INTERFACE ".UnknownMethod",
+ error));
}
DBusHandlerResult error_not_authorized(DBusConnection *conn, DBusMessage *msg)