From 483c7d7e659b87528a83f18383bd799c6ecdc74e Mon Sep 17 00:00:00 2001 From: Sunwook Bae Date: Wed, 31 Jul 2013 20:08:39 +0900 Subject: [PATCH] Apply the secure logs Change-Id: Ic5b87849f5a921dfde4811ce28867aff63ddbcf5 Signed-off-by: Sunwook Bae --- src/MessagePortProxy.cpp | 14 +++++++------- src/message-port-log.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/MessagePortProxy.cpp b/src/MessagePortProxy.cpp index 50b5f77..24abd93 100644 --- a/src/MessagePortProxy.cpp +++ b/src/MessagePortProxy.cpp @@ -120,7 +120,7 @@ MessagePortProxy::OnIpcResponseReceived(IpcClient& client, const IPC::Message& m int MessagePortProxy::RegisterMessagePort(const string& localPort, bool isTrusted, messageport_message_cb callback) { - _LOGI("Register a message port : [%s:%s]", __appId.c_str(), localPort.c_str()); + _SECURE_LOGI("Register a message port : [%s:%s]", __appId.c_str(), localPort.c_str()); int id = 0; @@ -208,7 +208,7 @@ MessagePortProxy::RegisterMessagePort(const string& localPort, bool isTrusted, int MessagePortProxy::CheckRemotePort(const string& remoteAppId, const string& remotePort, bool isTrusted, bool *exist) { - _LOGI("Check a remote port : [%s:%s]", remoteAppId.c_str(), remotePort.c_str()); + _SECURE_LOGI("Check a remote port : [%s:%s]", remoteAppId.c_str(), remotePort.c_str()); bundle *b = bundle_create(); @@ -263,7 +263,7 @@ MessagePortProxy::CheckRemotePort(const string& remoteAppId, const string& remot } else if (return_value == MESSAGEPORT_ERROR_CERTIFICATE_NOT_MATCH) { - _LOGI("The remote application (%s) is not signed with the same certificate", remoteAppId.c_str()); + _SECURE_LOGI("The remote application (%s) is not signed with the same certificate", remoteAppId.c_str()); *exist = true; return MESSAGEPORT_ERROR_CERTIFICATE_NOT_MATCH; @@ -282,7 +282,7 @@ MessagePortProxy::CheckRemotePort(const string& remoteAppId, const string& remot int MessagePortProxy::SendMessage(const string& remoteAppId, const string& remotePort, bool trustedMessage, bundle* data) { - _LOGI("Send a message to : [%s:%s]", remoteAppId.c_str(), remotePort.c_str()); + _SECURE_LOGI("Send a message to : [%s:%s]", remoteAppId.c_str(), remotePort.c_str()); int ret = 0; @@ -319,7 +319,7 @@ MessagePortProxy::SendMessage(const string& remoteAppId, const string& remotePor int MessagePortProxy::SendMessage(const string& localPort, bool trustedPort, const string& remoteAppId, const string& remotePort, bool trustedMessage, bundle* data) { - _LOGI("Send a bidirectional message from [%s:%s] to [%s:%s]", __appId.c_str(), localPort.c_str(), remoteAppId.c_str(), remotePort.c_str()); + _SECURE_LOGI("Send a bidirectional message from [%s:%s] to [%s:%s]", __appId.c_str(), localPort.c_str(), remoteAppId.c_str(), remotePort.c_str()); int ret = 0; @@ -579,7 +579,7 @@ MessagePortProxy::OnSendMessageInternal(const BundleBuffer& metadata, const Bund string messageType = bundle_get_val(b, MESSAGE_TYPE); - _LOGI("Message received to App: %s, Port: %s, Trusted: %s", pRemoteAppId, pRemotePort, trustedMessage.c_str()); + _SECURE_LOGI("Message received to App: %s, Port: %s, Trusted: %s", pRemoteAppId, pRemotePort, trustedMessage.c_str()); int id = 0; messageport_message_cb callback; @@ -608,7 +608,7 @@ MessagePortProxy::OnSendMessageInternal(const BundleBuffer& metadata, const Bund string localPort = bundle_get_val(b, LOCAL_PORT); string trustedLocal = bundle_get_val(b, TRUSTED_LOCAL); - _LOGI("From App: %s, Port: %s, TrustedLocal: %s", localAppId.c_str(), localPort.c_str(), trustedLocal.c_str()); + _SECURE_LOGI("From App: %s, Port: %s, TrustedLocal: %s", localAppId.c_str(), localPort.c_str(), trustedLocal.c_str()); bool trustedPort = (trustedLocal.compare("TRUE") == 0); diff --git a/src/message-port-log.h b/src/message-port-log.h index 9823651..ea6b979 100644 --- a/src/message-port-log.h +++ b/src/message-port-log.h @@ -32,8 +32,8 @@ extern "C" { #define _LOGE(fmt, arg...) LOGE(fmt, ##arg) #define _LOGI(fmt, arg...) LOGI(fmt, ##arg) -//#define _SECURE_LOGE(fmt, arg...) SECURE_LOGE(fmt, ##arg) -//#define _SECURE_LOGI(fmt, arg...) SECURE_LOGI(fmt, ##arg) +#define _SECURE_LOGE(fmt, arg...) SECURE_LOGE(fmt, ##arg) +#define _SECURE_LOGI(fmt, arg...) SECURE_LOGI(fmt, ##arg) /** * @} -- 2.7.4