summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/src
diff options
context:
space:
mode:
authorchristian linke <christian.linke@bmw.de>2012-10-30 17:52:13 +0100
committerchristian linke <christian.linke@bmw.de>2012-10-30 17:52:13 +0100
commit7128815d6cd5106441f7be5454a8a7375c8ac1ab (patch)
tree6db286136aa6775e530d94e669144b3ff31c3273 /AudioManagerDaemon/src
parentf9de38ac41d5da1d5cc52e8797dd47bdac4b3116 (diff)
downloadaudiomanager-7128815d6cd5106441f7be5454a8a7375c8ac1ab.tar.gz
* make DLTWrapper unregister itself before exiting
Signed-off-by: christian linke <christian.linke@bmw.de>
Diffstat (limited to 'AudioManagerDaemon/src')
-rw-r--r--AudioManagerDaemon/src/CAmControlReceiver.cpp2
-rw-r--r--AudioManagerDaemon/src/CAmDltWrapper.cpp10
2 files changed, 12 insertions, 0 deletions
diff --git a/AudioManagerDaemon/src/CAmControlReceiver.cpp b/AudioManagerDaemon/src/CAmControlReceiver.cpp
index 583ad0d..6960fd0 100644
--- a/AudioManagerDaemon/src/CAmControlReceiver.cpp
+++ b/AudioManagerDaemon/src/CAmControlReceiver.cpp
@@ -485,6 +485,8 @@ void CAmControlReceiver::confirmControllerRundown()
{
logInfo ("CAmControlReceiver::confirmControllerRundown(), exiting regularly");
//once the controller is ready, it will exit.
+ CAmDltWrapper* inst(getWrapper());
+ inst->deinit();
exit (0);
//todo: one time implement here system interaction with NSM
}
diff --git a/AudioManagerDaemon/src/CAmDltWrapper.cpp b/AudioManagerDaemon/src/CAmDltWrapper.cpp
index 51ab7ce..c8fe8e1 100644
--- a/AudioManagerDaemon/src/CAmDltWrapper.cpp
+++ b/AudioManagerDaemon/src/CAmDltWrapper.cpp
@@ -52,6 +52,13 @@ void CAmDltWrapper::unregisterContext(DltContext & handle)
#endif
}
+void CAmDltWrapper::deinit()
+{
+#ifdef WITH_DLT
+ unregisterContext(mDltContext);
+#endif
+}
+
CAmDltWrapper::CAmDltWrapper(const bool enableNoDLTDebug) :
#ifndef WITH_DLT
mEnableNoDLTDebug(enableNoDLTDebug),
@@ -244,7 +251,10 @@ void CAmDltWrapper::enableNoDLTDebug(const bool enableNoDLTDebug)
CAmDltWrapper::~CAmDltWrapper()
{
if (mpDLTWrapper)
+ {
+ mpDLTWrapper->unregisterContext(mDltContext);
delete mpDLTWrapper;
+ }
}
}