From: Bartlomiej Grzelewski Date: Wed, 11 Sep 2013 09:26:51 +0000 (+0200) Subject: Clean-up logging X-Git-Tag: submit/tizen/20140307.131547~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6656a7f8958cc7a91ce9f5e4601460c05bfa9fec;p=platform%2Fcore%2Fsecurity%2Fsecurity-server.git Clean-up logging Change logging in ss1, now in RELEASE build log only errors [Issue#] SSDWSSP-457 [Bug/Feature] Clean-up logging [Cause] N/A [Solution] N/A [Verification] Build Change-Id: I1584eafdcaec478cc6ccab40bcb55a8969e21b1a --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 53bc523..9f96b98 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,7 +33,6 @@ SET_SOURCE_FILES_PROPERTIES( ${SECURITY_SERVER_SOURCES} PROPERTIES COMPILE_FLAGS "-D_GNU_SOURCE") - # with flag -DSECURITY_SERVER_DEBUG_DLOG debug and warning logs on INCLUDE_DIRECTORIES( ${SECURITY_SERVER_PATH}/include @@ -80,7 +79,6 @@ SET(SECURITY_CLIENT_SOURCES ADD_LIBRARY(${TARGET_SECURITY_CLIENT} SHARED ${SECURITY_CLIENT_SOURCES}) -# and COMPILE_FLAGS "-DSECURITY_SERVER_DEBUG_DLOG" to turn on debug and warning logs SET_TARGET_PROPERTIES( ${TARGET_SECURITY_CLIENT} PROPERTIES diff --git a/src/include/security-server-common.h b/src/include/security-server-common.h index 9eb0e41..6c098b1 100644 --- a/src/include/security-server-common.h +++ b/src/include/security-server-common.h @@ -126,7 +126,7 @@ void printhex(const unsigned char *data, int size); #endif #define LOG_TAG "SECURITY_SERVER" #define SEC_SVR_ERR SLOGE -#if SECURITY_SERVER_DEBUG_DLOG /* debug msg will be printed by dlog daemon */ +#ifdef BUILD_TYPE_DEBUG /* debug msg will be printed by dlog daemon */ #define SEC_SVR_DBG SLOGD #define SEC_SVR_WRN SLOGW #else /* No debug output */ @@ -142,7 +142,7 @@ void printhex(const unsigned char *data, int size); #endif #define SECURE_SLOGW(FMT, ARG ...) do { } while(0) -#endif // SECURITY_SERVER_DEBUG_DLOG +#endif // BUILD_TYPE_DEBUG #endif // SECURITY_SERVER_DEBUG_TO_CONSOLE #ifdef __cplusplus diff --git a/src/server/security-server-password.c b/src/server/security-server-password.c index fc30d26..087e12f 100644 --- a/src/server/security-server-password.c +++ b/src/server/security-server-password.c @@ -318,11 +318,7 @@ int check_password(const unsigned char *cur_pwd, const unsigned char *requested_ const unsigned int max_attempts, const unsigned int expire_time, int *current_attempt) { -/* The following variable is needed only when SECURITY_SERVER_DEBUG_DLOG flag is set */ -/* If its definition is not surrounded by preprocessor conditionals then it will */ -/* cause compilation warning "unused variable". Please see the SECURE_SLOGD redefinition */ -/* in "security_server_common.h" header */ -#if SECURITY_SERVER_DEBUG_DLOG +#ifdef BUILD_TYPE_DEBUG unsigned int current_time = time(NULL); #endif