summaryrefslogtreecommitdiff
path: root/src/dbus-unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-08 02:27:43 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-08 02:27:43 +0100
commit08672cb5071af320127f6fe8d0916f62bedd82f3 (patch)
treed91cc733ba11fe57de18901ce584e325489ad23b /src/dbus-unit.c
parent83310f162d2a78913b2748aaa5ffb1ae8226484f (diff)
dbus: return DBUS_ERROR_UNKNOWN_OBJECT when an object is unknown
Diffstat (limited to 'src/dbus-unit.c')
-rw-r--r--src/dbus-unit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dbus-unit.c b/src/dbus-unit.c
index 835eeda329..cd6ad843f9 100644
--- a/src/dbus-unit.c
+++ b/src/dbus-unit.c
@@ -567,8 +567,11 @@ static DBusHandlerResult bus_unit_message_handler(DBusConnection *connection, DB
if (r == -ENOMEM)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
- if (r == -ENOENT)
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ if (r == -ENOENT) {
+ DBusError e;
+ dbus_set_error_const(&e, DBUS_ERROR_UNKNOWN_OBJECT, "Unknown unit");
+ return bus_send_error_reply(m, connection, message, &e, r);
+ }
return bus_send_error_reply(m, connection, message, NULL, r);
}