Rebase against master changes, fix indent

refs #7619
This commit is contained in:
Michael Friedrich 2014-11-10 20:21:22 +01:00
parent 721483e0b2
commit 3211756656
1 changed files with 105 additions and 105 deletions

View File

@ -40,7 +40,7 @@ void GelfWriter::Start(void)
{
DynamicObject::Start();
m_ReconnectTimer = make_shared<Timer>();
m_ReconnectTimer = new Timer();
m_ReconnectTimer->SetInterval(10);
m_ReconnectTimer->OnTimerExpired.connect(boost::bind(&GelfWriter::ReconnectTimerHandler, this));
m_ReconnectTimer->Start();
@ -59,7 +59,7 @@ void GelfWriter::ReconnectTimerHandler(void)
if (m_Stream)
return;
TcpSocket::Ptr socket = make_shared<TcpSocket>();
TcpSocket::Ptr socket = new TcpSocket();
Log(LogNotice, "GelfWriter")
<< "Reconnecting to GELF endpoint '" << GetHost() << "' port '" << GetPort() << "'.";
@ -72,14 +72,14 @@ void GelfWriter::ReconnectTimerHandler(void)
return;
}
m_Stream = make_shared<NetworkStream>(socket);
m_Stream = new NetworkStream(socket);
}
void GelfWriter::CheckResultHandler(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr)
{
CONTEXT("GELF Processing check result for '" + checkable->GetName() + "'");
Dictionary::Ptr fields = make_shared<Dictionary>();
Dictionary::Ptr fields = new Dictionary();
Service::Ptr service = dynamic_pointer_cast<Service>(checkable);
Host::Ptr host;
@ -118,7 +118,7 @@ void GelfWriter::NotificationToUserHandler(const Notification::Ptr& notification
if (cr)
output = CompatUtility::GetCheckResultOutput(cr);
Dictionary::Ptr fields = make_shared<Dictionary>();
Dictionary::Ptr fields = new Dictionary();
if (service) {
host = service->GetHost();
fields->Set("_type", "SERVICE NOTIFICATION");
@ -145,7 +145,7 @@ void GelfWriter::StateChangeHandler(const Checkable::Ptr& checkable, const Check
Service::Ptr service;
tie(host, service) = GetHostService(checkable);
Dictionary::Ptr fields = make_shared<Dictionary>();
Dictionary::Ptr fields = new Dictionary();
fields->Set("_state", service ? static_cast<int>(service->GetState()) : static_cast<int>(host->GetState()));
fields->Set("_type", "STATE CHANGE");
fields->Set("_current_check_attempt", checkable->GetCheckAttempt());