From 478e42dbde6d69ce97ae9b2f26e59d6d878908ad Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Mon, 12 Aug 2013 11:07:48 +0200 Subject: [PATCH] comments: Only send signal on removal. --- lib/icinga/service-comment.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/icinga/service-comment.cpp b/lib/icinga/service-comment.cpp index 874dccaa0..d3083b025 100644 --- a/lib/icinga/service-comment.cpp +++ b/lib/icinga/service-comment.cpp @@ -277,11 +277,12 @@ void Service::RemoveCommentsByType(int type) comments->Remove(id); } + OnCommentsChanged(GetSelf(), Empty, CommentChangedDeleted); + ObjectLock olock(this); Touch("comments"); } - OnCommentsChanged(GetSelf(), Empty, CommentChangedDeleted); } void Service::RemoveExpiredComments(void) @@ -309,11 +310,12 @@ void Service::RemoveExpiredComments(void) comments->Remove(id); } + OnCommentsChanged(GetSelf(), Empty, CommentChangedDeleted); + ObjectLock olock(this); Touch("comments"); } - OnCommentsChanged(GetSelf(), Empty, CommentChangedDeleted); } void Service::CommentsExpireTimerHandler(void) -- 2.50.1