From 08a54bee2198b948580537033c8945ca5bd6e7f8 Mon Sep 17 00:00:00 2001 From: Christian Linke Date: Wed, 20 Apr 2016 05:34:04 -0700 Subject: enable deleting of CommandLineSingleton fix log message Signed-off-by: Christian Linke --- AudioManagerUtilities/include/CAmCommandLineSingleton.h | 5 +++++ AudioManagerUtilities/src/CAmCommandLineSingleton.cpp | 8 ++++++++ AudioManagerUtilities/src/CAmSocketHandler.cpp | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/AudioManagerUtilities/include/CAmCommandLineSingleton.h b/AudioManagerUtilities/include/CAmCommandLineSingleton.h index 7f394ae..10d92d4 100644 --- a/AudioManagerUtilities/include/CAmCommandLineSingleton.h +++ b/AudioManagerUtilities/include/CAmCommandLineSingleton.h @@ -35,8 +35,13 @@ public: const char delimiter = ' ', const std::string& version = "none", bool helpAndVersion = true); + static TCLAP::CmdLine* instance(); + + static void deleteInstance(); + private: + CAmCommandLineSingleton(); virtual ~CAmCommandLineSingleton(); }; diff --git a/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp b/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp index d2dff35..1170c31 100644 --- a/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp +++ b/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp @@ -44,6 +44,14 @@ TCLAP::CmdLine* CAmCommandLineSingleton::instance() return pSingleCmdLine; } +void CAmCommandLineSingleton::deleteInstance() +{ + if (pSingleCmdLine) + delete pSingleCmdLine; + + pSingleCmdLine=NULL; +} + CAmCommandLineSingleton::~CAmCommandLineSingleton() { // TODO Auto-generated destructor stub } diff --git a/AudioManagerUtilities/src/CAmSocketHandler.cpp b/AudioManagerUtilities/src/CAmSocketHandler.cpp index 513c3e0..e4e89d7 100644 --- a/AudioManagerUtilities/src/CAmSocketHandler.cpp +++ b/AudioManagerUtilities/src/CAmSocketHandler.cpp @@ -51,7 +51,7 @@ CAmSocketHandler::CAmSocketHandler() : { if (pipe(mPipe) == -1) { - logError("CAmSerializer could not create pipe!"); + logError("Sockethandler could not create pipe!"); } //add the pipe to the poll - nothing needs to be proccessed here we just need the pipe to trigger the ppoll -- cgit v1.2.1