summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/client/ocsp-client.cpp2
-rw-r--r--src/common/CMakeLists.txt1
-rw-r--r--src/common/log.cpp (renamed from src/log/log.cpp)1
-rw-r--r--src/common/log.h (renamed from src/include/cchecker/log.h)15
-rw-r--r--src/common/mainloop.cpp2
-rw-r--r--src/common/service.cpp2
-rw-r--r--src/common/socket.cpp2
-rw-r--r--src/db/sql_query.cpp2
-rw-r--r--src/dpl/core/src/assert.cpp2
-rw-r--r--src/dpl/core/src/exception.cpp2
-rw-r--r--src/dpl/core/src/string.cpp2
-rw-r--r--src/dpl/db/include/cchecker/dpl/db/sql_connection.h2
-rw-r--r--src/dpl/db/src/sql_connection.cpp2
-rw-r--r--src/main/cert-checker.cpp2
-rw-r--r--src/service/app.cpp2
-rw-r--r--src/service/certs.cpp2
-rw-r--r--src/service/logic.cpp2
-rw-r--r--src/service/ocsp-service.cpp2
-rw-r--r--src/ui/UIBackend.cpp2
-rw-r--r--src/ui/popup-bin/CMakeLists.txt5
-rw-r--r--src/ui/popup-bin/popup.cpp2
-rw-r--r--src/ui/popup-runner.cpp2
23 files changed, 30 insertions, 32 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 420b5ff..7e6ee57 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -30,7 +30,6 @@ PKG_CHECK_MODULES(${TARGET_CERT_CHECKER}_DEP
gio-2.0
icu-i18n
key-manager
- libsystemd-journal
libsystemd-daemon
sqlite3
pkgmgr
@@ -46,7 +45,6 @@ SET(${TARGET_CERT_CHECKER}_SRCS
${CERT_CHECKER_SERVICE_PATH}/queue.cpp
${CERT_CHECKER_SERVICE_PATH}/certs.cpp
${CERT_CHECKER_SERVICE_PATH}/ocsp-service.cpp
- ${CERT_CHECKER_LOG_PATH}/log.cpp
${CERT_CHECKER_DB_PATH}/sql_query.cpp
${CERT_CHECKER_UI_PATH}/UIBackend.cpp
${CERT_CHECKER_UI_PATH}/popup-runner.cpp
@@ -71,7 +69,7 @@ INCLUDE_DIRECTORIES(SYSTEM
SET_SOURCE_FILES_PROPERTIES(${${TARGET_CERT_CHECKER}_SRCS}
PROPERTIES
- COMPILE_FLAGS "-D_GNU_SOURCE -fPIE -fvisibility=default"
+ COMPILE_FLAGS "-D_GNU_SOURCE -fPIE"
)
ADD_EXECUTABLE(${TARGET_CERT_CHECKER} ${${TARGET_CERT_CHECKER}_SRCS})
diff --git a/src/client/ocsp-client.cpp b/src/client/ocsp-client.cpp
index 77484fc..c805715 100644
--- a/src/client/ocsp-client.cpp
+++ b/src/client/ocsp-client.cpp
@@ -23,7 +23,7 @@
#include "client/error.h"
#include "common/command-id.h"
-#include <cchecker/log.h>
+#include "common/log.h"
namespace CCHECKER {
namespace Client {
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index dcd149d..4cc3754 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -31,6 +31,7 @@ SET(${TARGET_CERT_CHECKER_COMMON}_SRCS
${COMMON_PATH}/mainloop.cpp
${COMMON_PATH}/service.cpp
${COMMON_PATH}/socket.cpp
+ ${COMMON_PATH}/log.cpp
)
INCLUDE_DIRECTORIES(SYSTEM
diff --git a/src/log/log.cpp b/src/common/log.cpp
index ced0fe9..c5528a2 100644
--- a/src/log/log.cpp
+++ b/src/common/log.cpp
@@ -18,6 +18,7 @@
* @author Janusz Kozerski <j.kozerski@samsung.com>
* @brief This file declares class for ask user window
*/
+#include "common/log.h"
#include <stdexcept>
#include <systemd/sd-journal.h>
diff --git a/src/include/cchecker/log.h b/src/common/log.h
index d4efcdc..99d494b 100644
--- a/src/include/cchecker/log.h
+++ b/src/common/log.h
@@ -62,24 +62,21 @@ do \
__FUNCTION__); \
} while (0)
-/* Errors must be always logged. */
+/* always logged. */
#define LogError(message) \
CERT_CHECKER_LOG(message, LOG_ERR)
+#define LogInfo(message) \
+ CERT_CHECKER_LOG(message, LOG_INFO)
+#define LogWarning(message) \
+ CERT_CHECKER_LOG(message, LOG_WARNING)
+/* only debug logged. */
#ifdef BUILD_TYPE_DEBUG
#define LogDebug(message) \
CERT_CHECKER_LOG(message, LOG_DEBUG)
- #define LogInfo(message) \
- CERT_CHECKER_LOG(message, LOG_INFO)
- #define LogWarning(message) \
- CERT_CHECKER_LOG(message, LOG_WARNING)
#else
#define LogDebug(message) \
DPL_MACRO_DUMMY_LOGGING(message, LOG_DEBUG)
- #define LogInfo(message) \
- DPL_MACRO_DUMMY_LOGGING(message, LOG_INFO)
- #define LogWarning(message) \
- DPL_MACRO_DUMMY_LOGGING(message, LOG_WARNING)
#endif // BUILD_TYPE_DEBUG
#endif //CERT_CHECKER_LOG_H
diff --git a/src/common/mainloop.cpp b/src/common/mainloop.cpp
index 19ff477..4e0f7dd 100644
--- a/src/common/mainloop.cpp
+++ b/src/common/mainloop.cpp
@@ -27,7 +27,7 @@
#include <sys/epoll.h>
#include <unistd.h>
-#include <cchecker/log.h>
+#include "common/log.h"
namespace CCHECKER {
diff --git a/src/common/service.cpp b/src/common/service.cpp
index 49f2408..6f3c46c 100644
--- a/src/common/service.cpp
+++ b/src/common/service.cpp
@@ -25,7 +25,7 @@
#include <sys/types.h>
#include <sys/epoll.h>
-#include <cchecker/log.h>
+#include "common/log.h"
namespace CCHECKER {
diff --git a/src/common/socket.cpp b/src/common/socket.cpp
index 30c2edc..05ed75f 100644
--- a/src/common/socket.cpp
+++ b/src/common/socket.cpp
@@ -31,7 +31,7 @@
#include <systemd/sd-daemon.h>
-#include <cchecker/log.h>
+#include "common/log.h"
namespace {
diff --git a/src/db/sql_query.cpp b/src/db/sql_query.cpp
index 800c144..bafbf56 100644
--- a/src/db/sql_query.cpp
+++ b/src/db/sql_query.cpp
@@ -22,7 +22,7 @@
#include <cchecker/dpl/db/sql_connection.h>
#include <cchecker/sql_query.h>
-#include <cchecker/log.h>
+#include "common/log.h"
namespace {
diff --git a/src/dpl/core/src/assert.cpp b/src/dpl/core/src/assert.cpp
index 2050617..e367562 100644
--- a/src/dpl/core/src/assert.cpp
+++ b/src/dpl/core/src/assert.cpp
@@ -24,7 +24,7 @@
#include <cchecker/dpl/assert.h>
#include <cchecker/dpl/exception.h>
-#include <cchecker/log.h>
+#include "common/log.h"
namespace CCHECKER {
void AssertProc(const char *condition,
diff --git a/src/dpl/core/src/exception.cpp b/src/dpl/core/src/exception.cpp
index d26e13c..bee161b 100644
--- a/src/dpl/core/src/exception.cpp
+++ b/src/dpl/core/src/exception.cpp
@@ -23,7 +23,7 @@
#include <cstdio>
#include <cchecker/dpl/exception.h>
-#include <cchecker/log.h>
+#include "common/log.h"
namespace CCHECKER {
Exception* Exception::m_lastException = NULL;
diff --git a/src/dpl/core/src/string.cpp b/src/dpl/core/src/string.cpp
index 3e1028e..7c8223d 100644
--- a/src/dpl/core/src/string.cpp
+++ b/src/dpl/core/src/string.cpp
@@ -33,7 +33,7 @@
#include <cchecker/dpl/errno_string.h>
#include <cchecker/dpl/exception.h>
#include <cchecker/dpl/scoped_array.h>
-#include <cchecker/log.h>
+#include "common/log.h"
// TODO: Completely move to ICU
namespace CCHECKER {
diff --git a/src/dpl/db/include/cchecker/dpl/db/sql_connection.h b/src/dpl/db/include/cchecker/dpl/db/sql_connection.h
index 8af5a58..d3612ce 100644
--- a/src/dpl/db/include/cchecker/dpl/db/sql_connection.h
+++ b/src/dpl/db/include/cchecker/dpl/db/sql_connection.h
@@ -33,7 +33,7 @@
#include <cchecker/dpl/noncopyable.h>
#include <cchecker/dpl/exception.h>
#include <cchecker/dpl/optional.h>
-#include <cchecker/log.h>
+#include "common/log.h"
namespace CCHECKER {
namespace DB {
diff --git a/src/dpl/db/src/sql_connection.cpp b/src/dpl/db/src/sql_connection.cpp
index 65c04ec..4bee5de 100644
--- a/src/dpl/db/src/sql_connection.cpp
+++ b/src/dpl/db/src/sql_connection.cpp
@@ -31,6 +31,8 @@
#include <cchecker/dpl/db/sql_connection.h>
#include <cchecker/dpl/db/naive_synchronization_object.h>
+#include "common/log.h"
+
namespace CCHECKER {
namespace DB {
namespace // anonymous
diff --git a/src/main/cert-checker.cpp b/src/main/cert-checker.cpp
index e4cdb44..389d37a 100644
--- a/src/main/cert-checker.cpp
+++ b/src/main/cert-checker.cpp
@@ -22,7 +22,7 @@
#include <glib.h>
-#include <cchecker/log.h>
+#include "common/log.h"
#include "service/logic.h"
#include "service/ocsp-service.h"
diff --git a/src/service/app.cpp b/src/service/app.cpp
index a61f4a3..c35bc73 100644
--- a/src/service/app.cpp
+++ b/src/service/app.cpp
@@ -25,7 +25,7 @@
#include <string>
#include <sys/types.h>
-#include <cchecker/log.h>
+#include "common/log.h"
namespace CCHECKER {
diff --git a/src/service/certs.cpp b/src/service/certs.cpp
index 248b867..c06fe6f 100644
--- a/src/service/certs.cpp
+++ b/src/service/certs.cpp
@@ -33,7 +33,7 @@
#include <ckm/ckm-type.h>
#include <ckm/ckm-raw-buffer.h>
-#include <cchecker/log.h>
+#include "common/log.h"
namespace CCHECKER {
diff --git a/src/service/logic.cpp b/src/service/logic.cpp
index f0ebaee..538c2e7 100644
--- a/src/service/logic.cpp
+++ b/src/service/logic.cpp
@@ -25,7 +25,7 @@
#include <stdexcept>
#include <set>
-#include <cchecker/log.h>
+#include "common/log.h"
#include <cchecker/sql_query.h>
#include <cchecker/UIBackend.h>
diff --git a/src/service/ocsp-service.cpp b/src/service/ocsp-service.cpp
index 8743de2..63a3c0a 100644
--- a/src/service/ocsp-service.cpp
+++ b/src/service/ocsp-service.cpp
@@ -22,7 +22,7 @@
#include "service/ocsp-service.h"
#include "common/command-id.h"
-#include <cchecker/log.h>
+#include "common/log.h"
namespace CCHECKER {
diff --git a/src/ui/UIBackend.cpp b/src/ui/UIBackend.cpp
index accac7c..bb15e34 100644
--- a/src/ui/UIBackend.cpp
+++ b/src/ui/UIBackend.cpp
@@ -21,7 +21,7 @@
#include <app_control.h>
-#include <cchecker/log.h>
+#include "common/log.h"
#include <cchecker/UIBackend.h>
#include <cchecker/popup-runner.h>
diff --git a/src/ui/popup-bin/CMakeLists.txt b/src/ui/popup-bin/CMakeLists.txt
index 285653a..a9e7e14 100644
--- a/src/ui/popup-bin/CMakeLists.txt
+++ b/src/ui/popup-bin/CMakeLists.txt
@@ -21,7 +21,6 @@
PKG_CHECK_MODULES(CERT_CHECKER_POPUP_DEP
elementary
- libsystemd-journal
libtzplatform-config
REQUIRED)
@@ -31,8 +30,6 @@ set(CERT_CHECKER_POPUP_SOURCES
${CERT_CHECKER_POPUP_SRC_DIR}/popup.cpp
${CERT_CHECKER_UI_PATH}/popup-runner.cpp
${CERT_CHECKER_SERVICE_PATH}/app.cpp
- # logs
- ${CERT_CHECKER_LOG_PATH}/log.cpp
# dpl
${DPL_CORE_SRC_PATH}/assert.cpp
${DPL_CORE_SRC_PATH}/exception.cpp
@@ -46,6 +43,7 @@ ADD_DEFINITIONS(${CERT_CHECKER_POPUP_DEP_CFLAGS})
INCLUDE_DIRECTORIES(
${CERT_CHECKER_POPUP_SRC_DIR}
${CERT_CHECKER_POPUP_DEP_INCLUDE_DIRS}
+ ${CERT_CHECKER_SRC_PATH}
${CERT_CHECKER_SRC_PATH}/include/
${DPL_CORE_SRC_PATH}/include/
)
@@ -61,6 +59,7 @@ SET_TARGET_PROPERTIES(${TARGET_CERT_CHECKER_POPUP} PROPERTIES
TARGET_LINK_LIBRARIES(${TARGET_CERT_CHECKER_POPUP}
${CERT_CHECKER_POPUP_DEP_LIBRARIES}
+ ${TARGET_CERT_CHECKER_COMMON}
-pie
)
diff --git a/src/ui/popup-bin/popup.cpp b/src/ui/popup-bin/popup.cpp
index f616907..b9381af 100644
--- a/src/ui/popup-bin/popup.cpp
+++ b/src/ui/popup-bin/popup.cpp
@@ -31,7 +31,7 @@
#include <Elementary.h>
#include <popup.h>
-#include <cchecker/log.h>
+#include "common/log.h"
#include <cchecker/UIBackend.h>
#include <cchecker/popup-runner.h>
#include <cchecker/dpl/serialization.h>
diff --git a/src/ui/popup-runner.cpp b/src/ui/popup-runner.cpp
index bae75e8..31e3e8f 100644
--- a/src/ui/popup-runner.cpp
+++ b/src/ui/popup-runner.cpp
@@ -31,7 +31,7 @@
#include "service/app.h"
#include "service/logic.h"
-#include <cchecker/log.h>
+#include "common/log.h"
#include <cchecker/UIBackend.h>
#include <cchecker/popup-runner.h>