1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-21 18:03:41 +03:00

dbus: log disconnect on api and system busses

This is an interesting event. Let's log about it.

(cherry picked from commit 11ee1bab60abde67cd0edc470c93c1afe10d975d)
(cherry picked from commit c189ecc7fe5039d98bbb448ab45ab0fa3842b3a3)
(cherry picked from commit 7054f66e6cd35c3fe68f3a9ba328d20e3813f4eb)
This commit is contained in:
Ronan Pigott 2024-11-28 12:51:38 -07:00 committed by Luca Boccassi
parent dbab170b9e
commit d0684dfb9f

View File

@ -131,10 +131,16 @@ static int signal_disconnected(sd_bus_message *message, void *userdata, sd_bus_e
assert(message);
assert_se(bus = sd_bus_message_get_bus(message));
if (bus == m->api_bus)
if (bus == m->api_bus) {
log_notice("Got disconnect on API bus.");
bus_done_api(m);
if (bus == m->system_bus)
}
if (bus == m->system_bus) {
/* If we are the system manager, this is already logged by the API bus. */
if (!MANAGER_IS_SYSTEM(m))
log_notice("Got disconnect on system bus.");
bus_done_system(m);
}
if (set_remove(m->private_buses, bus)) {
log_debug("Got disconnect on private connection.");