From 6c3b2a13488598d6c3ea365ae4acb62b68002278 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 11 Jun 2012 14:04:16 +0200 Subject: [PATCH] Bugfixes for libdyn. --- dyn/configvm.h | 2 +- dyn/dyn.vcxproj | 15 +++++++++++---- dyn/dynamicobject.cpp | 5 ++++- dyn/dynamicobject.h | 2 +- dyn/objectset.h | 2 +- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/dyn/configvm.h b/dyn/configvm.h index b6261b041..b6238b1bd 100644 --- a/dyn/configvm.h +++ b/dyn/configvm.h @@ -23,7 +23,7 @@ namespace icinga { -class ConfigVM +class I2_DYN_API ConfigVM { public: static void ExecuteItems(const vector& items); diff --git a/dyn/dyn.vcxproj b/dyn/dyn.vcxproj index 010bdee5a..02b532612 100644 --- a/dyn/dyn.vcxproj +++ b/dyn/dyn.vcxproj @@ -11,20 +11,27 @@ - + + + - + + + - + + + - + + diff --git a/dyn/dynamicobject.cpp b/dyn/dynamicobject.cpp index cc877ac3c..542b23b92 100644 --- a/dyn/dynamicobject.cpp +++ b/dyn/dynamicobject.cpp @@ -36,8 +36,11 @@ Dictionary::Ptr DynamicObject::GetConfig(void) const return m_Config; } -Dictionary::Ptr DynamicObject::GetTags(void) const +Dictionary::Ptr DynamicObject::GetTags(void) { + if (!m_Tags) + m_Tags = make_shared(); + return m_Tags; } diff --git a/dyn/dynamicobject.h b/dyn/dynamicobject.h index 719a9df29..e8d118a35 100644 --- a/dyn/dynamicobject.h +++ b/dyn/dynamicobject.h @@ -36,7 +36,7 @@ public: void SetConfig(Dictionary::Ptr config); Dictionary::Ptr GetConfig(void) const; - Dictionary::Ptr GetTags(void) const; + Dictionary::Ptr GetTags(void); string GetType(void) const; string GetName(void) const; diff --git a/dyn/objectset.h b/dyn/objectset.h index 770b12f0e..af0796a71 100644 --- a/dyn/objectset.h +++ b/dyn/objectset.h @@ -124,7 +124,7 @@ public: private: set m_Objects; - ObjectSet::Ptr m_Parent; + typename ObjectSet::Ptr m_Parent; function m_Predicate; int ObjectAddedOrCommittedHandler(const ObjectSetEventArgs& ea)