chiark / gitweb /
bus: sync with kdbus
[elogind.git] / src / libsystemd / sd-bus / bus-kernel.c
index f6ef868e72d2845753aebba4386181a4d941419f..df772036ee44b03020fe9cdb0755bbc02abc5b6f 100644 (file)
@@ -1152,7 +1152,7 @@ int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync_call
 
                                 /* Anybody can send us invalid messages, let's just drop them. */
                                 if (r == -EBADMSG || r == -EPROTOTYPE)
-                                        log_debug_errno(r, "Ignoring invalid message: %m");
+                                        log_debug_errno(r, "Ignoring invalid synchronous reply: %m");
                                 else
                                         return r;
                         }
@@ -1345,15 +1345,12 @@ int bus_kernel_read_message(sd_bus *bus, bool hint_priority, int64_t priority) {
         }
 
         r = ioctl(bus->input_fd, KDBUS_CMD_RECV, &recv);
+        if (recv.return_flags & KDBUS_RECV_RETURN_DROPPED_MSGS)
+                log_debug("%s: kdbus reports %" PRIu64 " dropped broadcast messages, ignoring.", strna(bus->description), (uint64_t) recv.dropped_msgs);
         if (r < 0) {
                 if (errno == EAGAIN)
                         return 0;
 
-                if (errno == EOVERFLOW) {
-                        log_debug("%s: kdbus reports %" PRIu64 " dropped broadcast messages, ignoring.", strna(bus->description), (uint64_t) recv.dropped_msgs);
-                        return 0;
-                }
-
                 return -errno;
         }