Fix LogSystemSingleton issue
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Tue, 27 Jan 2015 15:35:33 +0000 (16:35 +0100)
committerMaciej J. Karpiuk <m.karpiuk2@samsung.com>
Tue, 17 Feb 2015 11:09:37 +0000 (12:09 +0100)
[Issue#] N/A
[Feature/Bug] N/A
[Problem] Logs from key-manager-common not visible
[Cause] 2 instances of LogSystemSingleton were created in key-manager binary
(log.cpp and key-manager-main.cpp)
[Solution] Excessive LogSystemSingleton definition removed.

[Verification] Compile & install ckm & tests. Run dlogutil and see if all logs
are visible (CKM-CLIENT and CKM including logs from key-manager-common library)

Change-Id: Idf508facc33318030db90633afa581d5cf012747

src/manager/client/client-common.cpp
src/manager/dpl/log/src/log.cpp
src/manager/main/key-manager-main.cpp

index c903c18..bb0674f 100644 (file)
@@ -32,7 +32,6 @@
 #include <dpl/log/log.h>
 #include <dpl/serialization.h>
 #include <dpl/singleton.h>
-#include <dpl/singleton_safe_impl.h>
 
 #include <message-buffer.h>
 
@@ -41,8 +40,6 @@
 #include <protocols.h>
 #include <client-common.h>
 
-IMPLEMENT_SAFE_SINGLETON(CKM::Log::LogSystem);
-
 namespace {
 
 const int POLL_TIMEOUT = 600000;
index 1e91ff1..5bfaacb 100644 (file)
 #include <cassert>
 
 #include <dpl/log/log.h>
-#include <dpl/singleton_impl.h>
+#include <dpl/singleton_safe_impl.h>
 #include <dpl/log/old_style_log_provider.h>
 #include <dpl/log/dlog_log_provider.h>
 #include <dpl/log/journal_log_provider.h>
 
-IMPLEMENT_SINGLETON(CKM::Log::LogSystem)
+IMPLEMENT_SAFE_SINGLETON(CKM::Log::LogSystem);
 
 namespace CKM {
 namespace Log {
index f878cd2..a92f8d3 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <dpl/log/log.h>
 #include <dpl/singleton.h>
-#include <dpl/singleton_safe_impl.h>
 
 #include <socket-manager.h>
 
@@ -40,8 +39,6 @@
 #include <CryptoService.h>
 #include <file-system.h>
 
-IMPLEMENT_SAFE_SINGLETON(CKM::Log::LogSystem);
-
 #define REGISTER_SOCKET_SERVICE(manager, service) \
     registerSocketService<service>(manager, #service)