[icinga-checkins] icinga.org: icinga2/master: livestatus: hosttable: fix checkperiod null ptr

git at icinga.org git at icinga.org
Fri Jul 5 11:47:03 CEST 2013


Module: icinga2
Branch: master
Commit: 03c18367ffeed3eddf9d91a9a0ec7ec87c5376a9
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=03c18367ffeed3eddf9d91a9a0ec7ec87c5376a9

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Fri Jul  5 11:46:20 2013 +0200

livestatus: hosttable: fix checkperiod null ptr

refs #4372

---

 components/livestatus/hoststable.cpp |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/components/livestatus/hoststable.cpp b/components/livestatus/hoststable.cpp
index b98b54d..178bdd4 100644
--- a/components/livestatus/hoststable.cpp
+++ b/components/livestatus/hoststable.cpp
@@ -250,14 +250,12 @@ Value HostsTable::CheckPeriodAccessor(const Object::Ptr& object)
 	if (!hc)
 		return Value();
 
-	return hc->GetCheckPeriod()->GetName();
-	/*
-	TimePeriod::Ptr timeperiod = hc->GetCheckPeriod;
+	TimePeriod::Ptr timeperiod = hc->GetCheckPeriod();
+
 	if (!timeperiod)
 		return Value();
 
 	return timeperiod->GetName();
-	*/
 }
 
 Value HostsTable::NotesAccessor(const Object::Ptr& object)





More information about the icinga-checkins mailing list