OnNotificationsRequested(this, recovery ? NotificationRecovery : NotificationProblem, cr, "", "");
}
-bool Checkable::IsCheckPending(void) const
-{
- ObjectLock olock(this);
- return m_CheckRunning;
-}
-
void Checkable::ExecuteRemoteCheck(const Dictionary::Ptr& resolvedMacros)
{
CONTEXT("Executing remote check for object '" + GetName() + "'");
Endpoint::Ptr GetCommandEndpoint(void) const;
- bool IsCheckPending(void) const;
-
static double CalculateExecutionTime(const CheckResult::Ptr& cr);
static double CalculateLatency(const CheckResult::Ptr& cr);
Log(LogInformation, "ApiListener")
<< "Finished sending config updates for endpoint '" << endpoint->GetName() << "'.";
- if (!needSync)
+ if (!needSync) {
+ ObjectLock olock2(endpoint);
+ endpoint->SetSyncing(false);
return;
+ }
Log(LogInformation, "ApiListener")
<< "Sending replay log for endpoint '" << endpoint->GetName() << "'.";
Log(LogInformation, "ApiListener")
<< "Finished sending replay log for endpoint '" << endpoint->GetName() << "'.";
-
} catch (const std::exception& ex) {
+ ObjectLock olock2(endpoint);
+ endpoint->SetSyncing(false);
+
Log(LogCritical, "ApiListener")
<< "Error while syncing endpoint '" << endpoint->GetName() << "': " << DiagnosticInformation(ex);
}
Zone::Ptr target_zone = target_endpoint->GetZone();
- if (!target_zone)
+ if (!target_zone) {
+ ObjectLock olock2(endpoint);
+ endpoint->SetSyncing(false);
return;
+ }
for (;;) {
boost::mutex::scoped_lock lock(m_LogLock);