chiark / gitweb /
exec: support unlimited resources
[elogind.git] / src / dbus-job.c
index e90d585b63d8e1d6657c61fc9a288d1a0c86a8a8..908ddba5379480672f9589294a395992f800700b 100644 (file)
 
 const char bus_job_interface[] _introspect_("Job") = BUS_JOB_INTERFACE;
 
+#define INTERFACES_LIST                              \
+        BUS_GENERIC_INTERFACES_LIST                  \
+        "org.freedesktop.systemd1.Job\0"
+
 #define INVALIDATING_PROPERTIES                 \
-        "State\0"                               \
-        "\0"                                    \
+        "State\0"
 
 static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_job_append_state, job_state, JobState);
 static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_job_append_type, job_type, JobType);
@@ -100,7 +103,7 @@ static DBusHandlerResult bus_job_message_dispatch(Job *j, DBusConnection *connec
                 job_finish_and_invalidate(j, JOB_CANCELED);
 
         } else
-                return bus_default_message_handler(j->manager, connection, message, INTROSPECTION, properties);
+                return bus_default_message_handler(j->manager, connection, message, INTROSPECTION, INTERFACES_LIST, properties);
 
         if (reply) {
                 if (!dbus_connection_send(connection, reply, NULL))
@@ -195,6 +198,8 @@ static DBusHandlerResult bus_job_message_handler(DBusConnection *connection, DBu
 
                 if (r == -ENOENT) {
                         DBusError e;
+
+                        dbus_error_init(&e);
                         dbus_set_error_const(&e, DBUS_ERROR_UNKNOWN_OBJECT, "Unknown job");
                         return bus_send_error_reply(m, connection, message, &e, r);
                 }