chiark / gitweb /
device: ignore a couple of 'API' devices
[elogind.git] / socket.c
index 4e3522505f4ba3d34e675e7509fe8d7b7c9a89c3..51bfc9a88d4c6c50be0a2a1bbbd68333d3c2515e 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -196,6 +196,11 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) {
                 prefix, s->socket_mode,
                 prefix, s->directory_mode);
 
+        if (s->control_pid > 0)
+                fprintf(f,
+                        "%sControl PID: %llu\n",
+                        prefix, (unsigned long long) s->control_pid);
+
         if (s->bind_to_device)
                 fprintf(f,
                         "%sBindToDevice: %s\n",
@@ -391,6 +396,9 @@ static void socket_set_state(Socket *s, SocketState state) {
         if (state != SOCKET_LISTENING)
                 socket_unwatch_fds(s);
 
+        if (state == old_state)
+                return;
+
         log_debug("%s changed %s → %s", unit_id(UNIT(s)), state_string_table[old_state], state_string_table[state]);
 
         unit_notify(UNIT(s), state_translation_table[old_state], state_translation_table[state]);