[icinga-checkins] icinga.org: icinga2/fix/dependency-graph-crash: Fix missing tracking calls for custom tracking accessors

git at icinga.org git at icinga.org
Mon May 9 14:12:37 CEST 2016


Module: icinga2
Branch: fix/dependency-graph-crash
Commit: 75ea35e86f3cabb22594d944f77f1cb9ffa4d612
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=75ea35e86f3cabb22594d944f77f1cb9ffa4d612

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Mon May  9 14:12:21 2016 +0200

Fix missing tracking calls for custom tracking accessors

---

 tools/mkclass/classcompiler.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/mkclass/classcompiler.cpp b/tools/mkclass/classcompiler.cpp
index c15b3e1..4c71364 100644
--- a/tools/mkclass/classcompiler.cpp
+++ b/tools/mkclass/classcompiler.cpp
@@ -901,7 +901,7 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)
 			       << "\t" << klass.Parent << "::Start(runtimeCreated);" << std::endl << std::endl;
 
 			for (it = klass.Fields.begin(); it != klass.Fields.end(); it++) {
-				if (!(it->Type.IsName))
+				if (!it->Type.IsName && it->TrackAccessor.empty())
 					continue;
 
 				m_Impl << "\t" << "Track" << it->GetFriendlyName() << "(Empty, Get" << it->GetFriendlyName() << "());" << std::endl;
@@ -913,7 +913,7 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)
 			       << "\t" << klass.Parent << "::Stop(runtimeRemoved);" << std::endl << std::endl;
 
 			for (it = klass.Fields.begin(); it != klass.Fields.end(); it++) {
-				if (!(it->Type.IsName))
+				if (!it->Type.IsName && it->TrackAccessor.empty())
 					continue;
 
 				m_Impl << "\t" << "Track" << it->GetFriendlyName() << "(Get" << it->GetFriendlyName() << "(), Empty);" << std::endl;



More information about the icinga-checkins mailing list