From ce1f88cde9f667b3509ff5fd32bf10ace0da305e Mon Sep 17 00:00:00 2001 From: Hyongtaek Lim Date: Thu, 24 Nov 2016 14:28:51 +0900 Subject: [PATCH] Rename MUSE_NO_LOG to MUSE_USE_LOG Change-Id: If07bb7cafc328678a7ae9e96440d9355edb903dc Signed-off-by: Hyongtaek Lim --- include/muse_core_log.h | 2 +- packaging/mused.spec | 4 ++-- src/muse_core.c | 2 +- src/muse_core_ipc.c | 2 +- src/muse_core_log.c | 2 +- src/muse_core_module.c | 2 +- src/muse_core_server.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/muse_core_log.h b/include/muse_core_log.h index c6e1551..d02b016 100644 --- a/include/muse_core_log.h +++ b/include/muse_core_log.h @@ -28,7 +28,7 @@ extern "C" { #include "muse_core.h" #include "muse_core_msg_json.h" -#ifndef MUSE_NO_LOG +#ifdef MUSE_USE_LOG #define MUSE_LOG_LEN 32 #define MUSE_LOG_MSG_LEN 128 #define MUSE_LOG_MSG_NUM 10 diff --git a/packaging/mused.spec b/packaging/mused.spec index 8a413fa..3458034 100644 --- a/packaging/mused.spec +++ b/packaging/mused.spec @@ -60,8 +60,8 @@ export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE -D_GNU_SOURCE" export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE -D_GNU_SOURCE" %endif -%if "%{?profile}" == "tv" -export CFLAGS+=" -DMUSE_NO_LOG" +%if "%{?profile}" != "tv" +export CFLAGS+=" -DMUSE_USE_LOG" %endif MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` diff --git a/src/muse_core.c b/src/muse_core.c index 9a46e41..2f10456 100644 --- a/src/muse_core.c +++ b/src/muse_core.c @@ -201,7 +201,7 @@ static int _muse_core_free(muse_core_t *server) muse_core_ipc_get_instance()->free(); muse_core_msg_get_instance()->free(); muse_core_security_get_instance()->free(); -#ifndef MUSE_NO_LOG +#ifdef MUSE_USE_LOG muse_core_log_get_instance()->free(); #endif LOGD("Leave"); diff --git a/src/muse_core_ipc.c b/src/muse_core_ipc.c index cc6aab6..dc17c5e 100644 --- a/src/muse_core_ipc.c +++ b/src/muse_core_ipc.c @@ -63,7 +63,7 @@ static void _muse_core_ipc_client_cleanup(muse_module_h module) { g_return_if_fail(module); -#ifndef MUSE_NO_LOG +#ifdef MUSE_USE_LOG muse_core_log_get_instance()->flush_msg(); #endif diff --git a/src/muse_core_log.c b/src/muse_core_log.c index 0f3e159..ebb0fad 100644 --- a/src/muse_core_log.c +++ b/src/muse_core_log.c @@ -44,7 +44,7 @@ #define BUILD_ID "BUILD_ID" #define delimiter "=" -#ifndef MUSE_NO_LOG +#ifdef MUSE_USE_LOG static muse_core_log_t *g_muse_core_log = NULL; static gboolean _muse_core_log_pid_is_valid(pid_t pid); diff --git a/src/muse_core_module.c b/src/muse_core_module.c index f0895a4..e490aa4 100644 --- a/src/muse_core_module.c +++ b/src/muse_core_module.c @@ -70,7 +70,7 @@ static void _muse_core_module_dispatch(int cmd, muse_module_h module) g_module_symbol(module->ch[MUSE_CHANNEL_MSG].dll_handle, DISPATCHER, (gpointer *)&dispatcher); if (dispatcher && dispatcher[cmd]) { -#ifndef MUSE_NO_LOG +#ifdef MUSE_USE_LOG _muse_core_module_set_dllsymbol_value(module->api_module, DISPATCHER_PTR, (gpointer) dispatcher[cmd]); muse_core_log_get_instance()->log_api_name((gpointer) dispatcher[cmd]); #endif diff --git a/src/muse_core_server.c b/src/muse_core_server.c index e39d4e8..a8b78ce 100644 --- a/src/muse_core_server.c +++ b/src/muse_core_server.c @@ -97,7 +97,7 @@ int main(int argc, char **argv) } muse_core_config_init(); -#ifndef MUSE_NO_LOG +#ifdef MUSE_USE_LOG muse_core_log_init(); #endif muse_core_module_init(); -- 2.7.4