summaryrefslogtreecommitdiff
path: root/src/core/dbus-manager.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-17 15:56:46 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-18 23:38:22 -0400
commit795ff6d5d827eb5743d9e37c4acaee4bdeff58b4 (patch)
tree9d68e9b15ba6748dc2dc25f6f1395f231ef7b241 /src/core/dbus-manager.c
parent596fc2636a898c0948cb9d2b3d3e7972084bc992 (diff)
shared/install: add helper function unit_file_changes_have_modification()
As suggested in review of #3049.
Diffstat (limited to 'src/core/dbus-manager.c')
-rw-r--r--src/core/dbus-manager.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 0c3b011b8b..ddfde23028 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -1565,13 +1565,11 @@ static int reply_unit_file_changes_and_free(
unsigned i;
int r;
- for (i = 0; i < n_changes; i++)
- if (unit_file_change_is_modification(changes[i].type)) {
- r = bus_foreach_bus(m, NULL, send_unit_files_changed, NULL);
- if (r < 0)
- log_debug_errno(r, "Failed to send UnitFilesChanged signal: %m");
- break;
- }
+ if (unit_file_changes_have_modification(changes, n_changes)) {
+ r = bus_foreach_bus(m, NULL, send_unit_files_changed, NULL);
+ if (r < 0)
+ log_debug_errno(r, "Failed to send UnitFilesChanged signal: %m");
+ }
r = sd_bus_message_new_method_return(message, &reply);
if (r < 0)