]> granicus.if.org Git - icinga2/commitdiff
comments: Only send signal on removal.
authorMichael Friedrich <michael.friedrich@netways.de>
Mon, 12 Aug 2013 09:07:48 +0000 (11:07 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Mon, 12 Aug 2013 09:08:22 +0000 (11:08 +0200)
lib/icinga/service-comment.cpp

index 874dccaa08bbf48837ec8189e829961867deef2c..d3083b0259eec772460d0615dab5dc70bce41c64 100644 (file)
@@ -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)