chiark / gitweb /
busname: don't drop 'service' from the result string
[elogind.git] / src / core / busname.c
index 034e5f60d12373a5fd9dbbbc91f83088b5bdf490..bca21450216a2b44c794065c7e73f9e05e7c2bd2 100644 (file)
@@ -217,7 +217,7 @@ static int busname_watch_fd(BusName *n) {
         if (n->event_source)
                 r = sd_event_source_set_enabled(n->event_source, SD_EVENT_ON);
         else
-                r = sd_event_add_io(UNIT(n)->manager->event, n->starter_fd, EPOLLIN, busname_dispatch_io, n, &n->event_source);
+                r = sd_event_add_io(UNIT(n)->manager->event, &n->event_source, n->starter_fd, EPOLLIN, busname_dispatch_io, n);
         if (r < 0) {
                 log_warning_unit(UNIT(n)->id, "Failed to watch starter fd: %s", strerror(-r));
                 busname_unwatch_fd(n);
@@ -337,8 +337,8 @@ static void busname_enter_running(BusName *n) {
                 log_debug_unit(UNIT(n)->id, "Suppressing activation request on %s since unit stop is scheduled.", UNIT(n)->id);
 
                 /* Flush all queued activation reqeuest by closing and reopening the connection */
+                bus_kernel_drop_one(n->starter_fd);
 
-                busname_close_fd(n);
                 busname_enter_listening(n);
                 return;
         }
@@ -548,6 +548,7 @@ DEFINE_STRING_TABLE_LOOKUP(busname_state, BusNameState);
 static const char* const busname_result_table[_BUSNAME_RESULT_MAX] = {
         [BUSNAME_SUCCESS] = "success",
         [BUSNAME_FAILURE_RESOURCES] = "resources",
+        [BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT] = "service-failed-permanent",
 };
 
 DEFINE_STRING_TABLE_LOOKUP(busname_result, BusNameResult);
@@ -584,7 +585,6 @@ const UnitVTable busname_vtable = {
 
         .bus_interface = "org.freedesktop.systemd1.BusName",
         .bus_vtable = bus_busname_vtable,
-        .bus_changing_properties = bus_busname_changing_properties,
 
         .status_message_formats = {
                 .finished_start_job = {