mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-28 11:55:23 +03:00
machined,logind: don't generate errors on signal match functions
If we get a weird signal, then we should log about it, but not return an error, since sd-bus will not call us again then anymore, but for these signals we match here we actually do want to be called on the next invocation.
This commit is contained in:
parent
089157763a
commit
65d73cf042
@ -2511,7 +2511,7 @@ int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *err
|
||||
r = sd_bus_message_read(message, "uoss", &id, &path, &unit, &result);
|
||||
if (r < 0) {
|
||||
bus_log_parse_error(r);
|
||||
return r;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (m->action_job && streq(m->action_job, path)) {
|
||||
@ -2579,7 +2579,7 @@ int match_unit_removed(sd_bus_message *message, void *userdata, sd_bus_error *er
|
||||
r = sd_bus_message_read(message, "so", &unit, &path);
|
||||
if (r < 0) {
|
||||
bus_log_parse_error(r);
|
||||
return r;
|
||||
return 0;
|
||||
}
|
||||
|
||||
session = hashmap_get(m->session_units, unit);
|
||||
@ -2611,8 +2611,10 @@ int match_properties_changed(sd_bus_message *message, void *userdata, sd_bus_err
|
||||
r = unit_name_from_dbus_path(path, &unit);
|
||||
if (r == -EINVAL) /* not a unit */
|
||||
return 0;
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r < 0) {
|
||||
log_oom();
|
||||
return 0;
|
||||
}
|
||||
|
||||
session = hashmap_get(m->session_units, unit);
|
||||
if (session)
|
||||
@ -2637,7 +2639,7 @@ int match_reloading(sd_bus_message *message, void *userdata, sd_bus_error *error
|
||||
r = sd_bus_message_read(message, "b", &b);
|
||||
if (r < 0) {
|
||||
bus_log_parse_error(r);
|
||||
return r;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (b)
|
||||
|
@ -1116,7 +1116,7 @@ int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *err
|
||||
r = sd_bus_message_read(message, "uoss", &id, &path, &unit, &result);
|
||||
if (r < 0) {
|
||||
bus_log_parse_error(r);
|
||||
return r;
|
||||
return 0;
|
||||
}
|
||||
|
||||
machine = hashmap_get(m->machine_units, unit);
|
||||
@ -1242,7 +1242,7 @@ int match_reloading(sd_bus_message *message, void *userdata, sd_bus_error *error
|
||||
r = sd_bus_message_read(message, "b", &b);
|
||||
if (r < 0) {
|
||||
bus_log_parse_error(r);
|
||||
return r;
|
||||
return 0;
|
||||
}
|
||||
if (b)
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user