ido: Fixes for comments.

refs #4380
This commit is contained in:
Michael Friedrich 2013-08-07 15:57:35 +02:00
parent 25a268c167
commit d3f24b31ec
2 changed files with 4 additions and 3 deletions

View File

@ -250,8 +250,6 @@ void Service::RefreshCommentsCache(void)
l_CommentsExpireTimer->OnTimerExpired.connect(boost::bind(&Service::CommentsExpireTimerHandler)); l_CommentsExpireTimer->OnTimerExpired.connect(boost::bind(&Service::CommentsExpireTimerHandler));
l_CommentsExpireTimer->Start(); l_CommentsExpireTimer->Start();
} }
OnCommentsChanged(Service::Ptr(), Empty, CommentChangedUpdated);
} }
void Service::RemoveCommentsByType(int type) void Service::RemoveCommentsByType(int type)

View File

@ -204,6 +204,9 @@ void ServiceDbObject::OnConfigUpdate(void)
OnQuery(query1); OnQuery(query1);
} }
/* update comments */
OnCommentsChanged(service, Empty, CommentChangedUpdated);
/* service host config update */ /* service host config update */
Host::Ptr host = service->GetHost(); Host::Ptr host = service->GetHost();
@ -344,7 +347,7 @@ void ServiceDbObject::CommentsChangedHandler(const Service::Ptr& svcfilter, cons
/* newly added comment */ /* newly added comment */
Log(LogDebug, "ido", "adding service comment (id = " + id + ") for '" + service->GetName() + "'"); Log(LogDebug, "ido", "adding service comment (id = " + id + ") for '" + service->GetName() + "'");
entry_time = static_cast<long>(comment->Get("entry_time")); entry_time = static_cast<long>(add_comment->Get("entry_time"));
entry_time_usec = (add_comment->Get("entry_time") - entry_time) * 1000 * 1000; entry_time_usec = (add_comment->Get("entry_time") - entry_time) * 1000 * 1000;
fields2 = boost::make_shared<Dictionary>(); fields2 = boost::make_shared<Dictionary>();