summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunwook Bae <sunwook45.bae@samsung.com>2013-08-27 19:17:56 +0900
committerSunwook Bae <sunwook45.bae@samsung.com>2013-08-27 19:18:33 +0900
commit430a3e9d8217c9ffca39150cba9da64e1a80d16d (patch)
treedda8cdfbb2e6c25d04686c87c43c9eff21a203f1
parentbf79317d962fa3f7aba7d9b18194a1478379d860 (diff)
parentede588f9b04dc32f109f73f47fa02c5cf56a6a7e (diff)
downloadmessage-port-430a3e9d8217c9ffca39150cba9da64e1a80d16d.tar.gz
message-port-430a3e9d8217c9ffca39150cba9da64e1a80d16d.tar.bz2
message-port-430a3e9d8217c9ffca39150cba9da64e1a80d16d.zip
Sync with tizen_2.2
Change-Id: I0715d9ce7a485d0f0ac3f9e1f131a1568ea0119f
-rwxr-xr-xCMakeLists.txt8
-rwxr-xr-xinclude/message-port.h34
-rwxr-xr-xmessage-port.pc.in2
-rwxr-xr-xpackaging/message-port.spec4
-rw-r--r--src/IpcClient.cpp64
-rw-r--r--src/IpcClient.h39
-rw-r--r--src/MessagePortProxy.cpp37
-rw-r--r--src/message-port-log.h4
8 files changed, 100 insertions, 92 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 617689a..150a797 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,7 +25,7 @@ SET (${this_target}_SOURCE_FILES
src/MessagePortProxy.cpp
)
-SET(requires "dlog bundle glib-2.0 chromium")
+SET(requires "dlog bundle glib-2.0 aul chromium")
INCLUDE(FindPkgConfig)
pkg_check_modules(${this_target} REQUIRED ${requires})
@@ -36,11 +36,11 @@ ENDFOREACH(flag)
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall" )
## SET C COMPILER FLAGS
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror -fvisibility=hidden")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
## SET CPP COMPILER FLAGS
-SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
+SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
IF("${ARCH}" STREQUAL "arm")
ADD_DEFINITIONS("-DTARGET")
@@ -59,7 +59,7 @@ TARGET_LINK_LIBRARIES(${this_target} "-ldlog" )
TARGET_LINK_LIBRARIES(${this_target} "-lbundle" )
TARGET_LINK_LIBRARIES(${this_target} "-lglib-2.0" )
TARGET_LINK_LIBRARIES(${this_target} "-lchromium" )
-TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-app-manager" )
+TARGET_LINK_LIBRARIES(${this_target} "-laul" )
SET_TARGET_PROPERTIES(${this_target}
PROPERTIES
diff --git a/include/message-port.h b/include/message-port.h
index 677a50b..6b194f9 100755
--- a/include/message-port.h
+++ b/include/message-port.h
@@ -19,6 +19,14 @@
#ifndef __APPFW_MESSAGE_PORT_H__
#define __APPFW_MESSAGE_PORT_H__
+#ifdef __GNUC__
+# ifndef EXPORT_API
+# define EXPORT_API __attribute__((visibility("default")))
+# endif
+#else
+# define EXPORT_API
+#endif
+
#include <bundle.h>
#ifdef __cplusplus
@@ -55,7 +63,8 @@ typedef void (*messageport_message_cb)(int id, const char* remote_app_id, const
/**
- * @brief Registers the local message port.
+ * @brief Registers the local message port. @n
+ * If the message port name is already registered, the previous message port id returns and the callback function is changed.
*
* @param [in] local_port the name of the local message port
* @param [in] callback The callback function to be called when a message is received
@@ -65,11 +74,12 @@ typedef void (*messageport_message_cb)(int id, const char* remote_app_id, const
* @retval #MESSAGEPORT_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error
*/
-int messageport_register_local_port(const char* local_port, messageport_message_cb callback);
+EXPORT_API int messageport_register_local_port(const char* local_port, messageport_message_cb callback);
/**
* @brief Registers the trusted local message port. @n
- * This allows communications only if the applications are signed with the same certificate which is uniquely assigned to the developer.
+ * If the message port name is already registered, the previous message port id returns and the callback function is changed. @n
+ * This allows communications only if the applications are signed with the same certificate which is uniquely assigned to the developer.
*
* @param [in] local_port the name of the local message port
* @param [in] callback The callback function to be called when a message is received
@@ -79,7 +89,7 @@ int messageport_register_local_port(const char* local_port, messageport_message_
* @retval #MESSAGEPORT_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error
*/
-int messageport_register_trusted_local_port(const char* local_port, messageport_message_cb callback);
+EXPORT_API int messageport_register_trusted_local_port(const char* local_port, messageport_message_cb callback);
/**
* @brief Checks if the message port of a remote application is registered.
@@ -93,7 +103,7 @@ int messageport_register_trusted_local_port(const char* local_port, messageport_
* @retval #MESSAGEPORT_ERROR_OUT_OF_MEMORY Out of memory
* @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error
*/
-int messageport_check_remote_port(const char* remote_app_id, const char *remote_port, bool* exist);
+EXPORT_API int messageport_check_remote_port(const char* remote_app_id, const char *remote_port, bool* exist);
/**
* @brief Checks if the trusted message port of a remote application is registered.
@@ -108,7 +118,7 @@ int messageport_check_remote_port(const char* remote_app_id, const char *remote_
* @retval #MESSAGEPORT_ERROR_CERTIFICATE_NOT_MATCH The remote application is not signed with the same certificate
* @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error
*/
-int messageport_check_trusted_remote_port(const char* remote_app_id, const char *remote_port, bool* exist);
+EXPORT_API int messageport_check_trusted_remote_port(const char* remote_app_id, const char *remote_port, bool* exist);
/**
* @brief Sends a message to the message port of a remote application.
@@ -136,7 +146,7 @@ int messageport_check_trusted_remote_port(const char* remote_app_id, const char
* bundle_free(b);
* @endcode
*/
-int messageport_send_message(const char* remote_app_id, const char* remote_port, bundle* message);
+EXPORT_API int messageport_send_message(const char* remote_app_id, const char* remote_port, bundle* message);
/**
* @brief Sends a trusted message to the message port of a remote application. @n
@@ -154,7 +164,7 @@ int messageport_send_message(const char* remote_app_id, const char* remote_port,
* @retval #MESSAGEPORT_ERROR_MAX_EXCEEDED The size of message has exceeded the maximum limit
* @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error
*/
-int messageport_send_trusted_message(const char* remote_app_id, const char* remote_port, bundle* message);
+EXPORT_API int messageport_send_trusted_message(const char* remote_app_id, const char* remote_port, bundle* message);
/**
* @brief Sends a message to the message port of a remote application. This method is used for the bidirectional communication.
@@ -192,7 +202,7 @@ int messageport_send_trusted_message(const char* remote_app_id, const char* remo
* bundle_free(b);
* }
*/
-int messageport_send_bidirectional_message(int id, const char* remote_app_id, const char* remote_port, bundle* data);
+EXPORT_API int messageport_send_bidirectional_message(int id, const char* remote_app_id, const char* remote_port, bundle* data);
/**
* @brief Sends a trusted message to the message port of a remote application. This method is used for the bidirectional communication.
@@ -211,7 +221,7 @@ int messageport_send_bidirectional_message(int id, const char* remote_app_id, co
* @retval #MESSAGEPORT_ERROR_MAX_EXCEEDED The size of message has exceeded the maximum limit
* @retval #MESSAGEPORT_ERROR_IO_ERROR Internal I/O error
*/
-int messageport_send_bidirectional_trusted_message(int id, const char* remote_app_id, const char* remote_port, bundle* data);
+EXPORT_API int messageport_send_bidirectional_trusted_message(int id, const char* remote_app_id, const char* remote_port, bundle* data);
/**
@@ -225,7 +235,7 @@ int messageport_send_bidirectional_trusted_message(int id, const char* remote_ap
* @retval #MESSAGEPORT_ERROR_OUT_OF_MEMORY Out of memory
* @remarks @a name must be released with free() by you
*/
-int messageport_get_local_port_name(int id, char **name);
+EXPORT_API int messageport_get_local_port_name(int id, char **name);
/**
* @brief Checks if the local message port is trusted.
@@ -237,7 +247,7 @@ int messageport_get_local_port_name(int id, char **name);
* @retval #MESSAGEPORT_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #MESSAGEPORT_ERROR_OUT_OF_MEMORY Out of memory
*/
-int messageport_check_trusted_local_port(int id, bool *trusted);
+EXPORT_API int messageport_check_trusted_local_port(int id, bool *trusted);
/**
* @}
diff --git a/message-port.pc.in b/message-port.pc.in
index ec7cdb8..bd7816a 100755
--- a/message-port.pc.in
+++ b/message-port.pc.in
@@ -4,7 +4,7 @@
prefix=@PREFIX@
exec_prefix=/usr
libdir=@LIB_INSTALL_DIR@
-includedir=/usr/include/appfw
+includedir=@INCLUDE_INSTALL_DIR@/appfw
Name: @PC_NAME@
Description: @PACKAGE_DESCRIPTION@
diff --git a/packaging/message-port.spec b/packaging/message-port.spec
index e99fb83..b9be824 100755
--- a/packaging/message-port.spec
+++ b/packaging/message-port.spec
@@ -1,6 +1,6 @@
Name: message-port
Summary: Message Port library
-Version: 1.2.1.0
+Version: 1.2.2.0
Release: 1
Group: TO_BE/FILLED_IN
License: Apache License, Version 2.0
@@ -11,7 +11,7 @@ BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(bundle)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(chromium)
-BuildRequires: pkgconfig(capi-appfw-app-manager)
+BuildRequires: pkgconfig(aul)
# runtime requires
Requires: chromium
diff --git a/src/IpcClient.cpp b/src/IpcClient.cpp
index 8f4d34b..8c06900 100644
--- a/src/IpcClient.cpp
+++ b/src/IpcClient.cpp
@@ -120,7 +120,6 @@ IpcClient::GetName(void) const
struct HelloMessage
{
- int pid;
int reverse;
};
@@ -138,9 +137,8 @@ IpcClient::MakeConnection(bool forReverse)
socketNameLength = socketName.size() + 1;
- HelloMessage helloMessage = {0, 0};
+ HelloMessage helloMessage = {0};
- helloMessage.pid = getpid();
if (forReverse)
{
helloMessage.reverse = 1;
@@ -179,7 +177,7 @@ IpcClient::MakeConnection(bool forReverse)
ret = connect(client, (struct sockaddr*) &server, serverLen);
if (ret < 0 && errno == ENOENT)
{
- _LOGD("The server is not ready. %d", retry);
+ _LOGI("The server is not ready. %d", retry);
usleep(1000 * 1000);
@@ -263,6 +261,7 @@ IpcClient::MakeConnection(bool forReverse)
ret = write(client, &helloMessage, sizeof(helloMessage));
if (ret < 0)
{
+ _LOGE("Failed to send a hello message: %d, %s", errno, strerror(errno));
goto CATCH;
}
@@ -319,7 +318,7 @@ IpcClient::HandleReceivedMessage(GIOChannel* source, GIOCondition condition)
if (condition & G_IO_HUP)
{
- _LOGD("G_IO_HUP, the connection is closed.");
+ _LOGI("G_IO_HUP, the connection is closed.");
g_source_destroy(__pReverseSource);
g_source_unref(__pReverseSource);
@@ -347,11 +346,11 @@ IpcClient::HandleReceivedMessage(GIOChannel* source, GIOCondition condition)
{
if (status == G_IO_STATUS_EOF)
{
- _LOGD("G_IO_STATUS_EOF, the connection is closed.");
+ _LOGI("G_IO_STATUS_EOF, the connection is closed.");
}
else
{
- _LOGD("G_IO_STATUS_ERROR, the connection is closed.");
+ _LOGI("G_IO_STATUS_ERROR, the connection is closed.");
}
pGError = NULL;
@@ -479,6 +478,14 @@ IpcClient::SendAsync(IPC::Message* pMessage)
while (remain > 0)
{
written = write(fd, (char*) pData, remain);
+ if (written < 0)
+ {
+ _LOGE("Failed to send a request: %d, %s", errno, strerror(errno));
+
+ ReleaseFd(fd);
+ return MESSAGEPORT_ERROR_IO_ERROR;
+ }
+
remain -= written;
pData += written;
}
@@ -491,8 +498,16 @@ IpcClient::SendAsync(IPC::Message* pMessage)
int
IpcClient::SendSync(IPC::Message* pMessage)
{
+ int error = MESSAGEPORT_ERROR_NONE;
+ int ret = 0;
+
+ int readSize = 0;
+ char buffer[1024];
+ char* pEndOfMessage = NULL;
+
+ std::string message;
+
IPC::Message* pReply = NULL;
- MessageReplyDeserializer* pReplyDeserializer = NULL;
IPC::SyncMessage* pSyncMessage = dynamic_cast <IPC::SyncMessage*>(pMessage);
if (pSyncMessage == NULL)
{
@@ -500,12 +515,15 @@ IpcClient::SendSync(IPC::Message* pMessage)
return MESSAGEPORT_ERROR_IO_ERROR;
}
+ MessageReplyDeserializer* pReplyDeserializer = pSyncMessage->GetReplyDeserializer();
int messageId = SyncMessage::GetMessageId(*pSyncMessage);
int fd = AcquireFd();
if (fd < 0)
{
_LOGE("Failed to get fd.");
+
+ delete pReplyDeserializer;
return MESSAGEPORT_ERROR_IO_ERROR;
}
@@ -520,9 +538,10 @@ IpcClient::SendSync(IPC::Message* pMessage)
{
_LOGE("Failed to send a request: %d, %s", errno, strerror(errno));
- ReleaseFd(fd);
- return MESSAGEPORT_ERROR_IO_ERROR;
+ error = MESSAGEPORT_ERROR_IO_ERROR;
+ goto CATCH;
}
+
remain -= written;
pData += written;
}
@@ -534,13 +553,6 @@ IpcClient::SendSync(IPC::Message* pMessage)
pfd.events = POLLIN | POLLRDHUP;
pfd.revents = 0;
- char buffer[1024];
- std::string message;
- int readSize = 0;
- char* pEndOfMessage = NULL;
-
- int ret = 0;
-
while (true)
{
ret = poll(&pfd, 1, -1);
@@ -552,15 +564,17 @@ IpcClient::SendSync(IPC::Message* pMessage)
}
_LOGE("Failed to poll (%d, %s).", errno, strerror(errno));
- return MESSAGEPORT_ERROR_IO_ERROR;
+
+ error = MESSAGEPORT_ERROR_IO_ERROR;
+ goto CATCH;
}
if (pfd.revents & POLLRDHUP)
{
_LOGE("POLLRDHUP");
- ReleaseFd(fd);
- return MESSAGEPORT_ERROR_IO_ERROR;
+ error = MESSAGEPORT_ERROR_IO_ERROR;
+ goto CATCH;
}
if (pfd.revents & POLLIN)
@@ -580,22 +594,24 @@ IpcClient::SendSync(IPC::Message* pMessage)
if (pReply == NULL)
{
_LOGE("The memory is insufficient.");
- return MESSAGEPORT_ERROR_OUT_OF_MEMORY;
+
+ error = MESSAGEPORT_ERROR_OUT_OF_MEMORY;
+ goto CATCH;
}
break;
}
}
- pReplyDeserializer = pSyncMessage->GetReplyDeserializer();
pReplyDeserializer->SerializeOutputParameters(*pReply);
-
delete pReply;
+
+CATCH:
delete pReplyDeserializer;
ReleaseFd(fd);
- return MESSAGEPORT_ERROR_NONE;
+ return error;
}
int
diff --git a/src/IpcClient.h b/src/IpcClient.h
index 716ed5d..ba1abfe 100644
--- a/src/IpcClient.h
+++ b/src/IpcClient.h
@@ -60,14 +60,12 @@ public:
/**
* Constructs the instance of this class.
*
- * @return An error code
- * @param[in] serverName The name of the server
- * @param[in] pListener Set if the client want to handle a message from the IPC server.
+ * @return 0 on success, otherwise a negative error value.
+ * @param [in] serverName The name of the server
+ * @param [in] pListener Set if the client want to handle a message from the IPC server.
* @c NULL, otherwise.
- * @exception E_SUCCESS The method was successful.
- * @exception E_OBJ_NOT_FOUND The IPC server was not found.
- * @exception E_OUT_OF_MEMORY Insufficient memory.
- * @exception E_SYSTEM A system error occurred.
+ * @retval MESSAGEPORT_ERROR_OUT_OF_MEMORY Insufficient memory.
+ * @retval MESSAGEPORT_ERROR_IO_ERROR A system error occurred.
*/
int Construct(const std::string& serverName, const IIpcClientEventListener* pListener = NULL);
@@ -81,28 +79,10 @@ public:
/**
* Sends a request message to an IPC server.
*
- * @code
- *
- *
- * int
- * CalculatorProxy::Add(int a , int b)
- * {
- * int c = 0;
- *
- * My_sum mySum(a, b, &c);
- *
- * __pIpcClient->SendRequest(mySum);
- *
- * return c;
- * }
- *
- * @endcode
- * @return An error code
- * @param[in] message The message to send
- * @exception E_SUCCESS The method was successful.
- * @exception E_INVALID_STATE The instance is in an invalid state.
- * @exception E_OUT_OF_MEMORY Insufficient memory.
- * @exception E_SYSTEM A system error occurred.
+ * @return 0 on success, otherwise a negative error value.
+ * @param [in] message The message to send
+ * @retval MESSAGEPORT_ERROR_OUT_OF_MEMORY Insufficient memory.
+ * @retval MESSAGEPORT_ERROR_IO_ERROR A system error occurred.
*
*/
int SendRequest(const IPC::Message& message);
@@ -135,7 +115,6 @@ private:
pthread_mutex_t* __pMutex;
std::vector <int> __fds;
- //Tizen::Base::Runtime::Mutex* __pFdLock;
std::string __name;
std::string __appId;
IIpcClientEventListener* __pListener;
diff --git a/src/MessagePortProxy.cpp b/src/MessagePortProxy.cpp
index eaf285f..0ff878d 100644
--- a/src/MessagePortProxy.cpp
+++ b/src/MessagePortProxy.cpp
@@ -26,7 +26,7 @@
#include <unistd.h>
#include <sstream>
-#include <app_manager.h>
+#include <aul/aul.h>
#include "message-port.h"
#include "message-port-messages.h"
@@ -93,18 +93,17 @@ MessagePortProxy::Construct(void)
__pIpcClient = pIpcClient;
int pid = getpid();
- char* pAppId = NULL;
- ret = app_manager_get_app_id(pid, &pAppId);
- if (ret < 0)
+ char buffer[256] = {0, };
+
+ ret = aul_app_get_appid_bypid(pid, buffer, sizeof(buffer));
+ if (ret != AUL_R_OK)
{
- _LOGE("Failed to get_app_id: %d", ret);
+ _LOGE("Failed to get the application ID: %d", ret);
return MESSAGEPORT_ERROR_IO_ERROR;
}
- __appId = pAppId;
-
- free(pAppId);
+ __appId = buffer;
return MESSAGEPORT_ERROR_NONE;
}
@@ -120,7 +119,7 @@ MessagePortProxy::OnIpcResponseReceived(IpcClient& client, const IPC::Message& m
int
MessagePortProxy::RegisterMessagePort(const string& localPort, bool isTrusted, messageport_message_cb callback)
{
- _LOGD("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 +207,7 @@ MessagePortProxy::RegisterMessagePort(const string& localPort, bool isTrusted,
int
MessagePortProxy::CheckRemotePort(const string& remoteAppId, const string& remotePort, bool isTrusted, bool *exist)
{
- _LOGD("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 +262,7 @@ MessagePortProxy::CheckRemotePort(const string& remoteAppId, const string& remot
}
else if (return_value == MESSAGEPORT_ERROR_CERTIFICATE_NOT_MATCH)
{
- _LOGE("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 +281,7 @@ MessagePortProxy::CheckRemotePort(const string& remoteAppId, const string& remot
int
MessagePortProxy::SendMessage(const string& remoteAppId, const string& remotePort, bool trustedMessage, bundle* data)
{
- _LOGD("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 +318,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)
{
- _LOGD("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;
@@ -384,6 +383,8 @@ MessagePortProxy::SendMessageInternal(const BundleBuffer& metadata, const Bundle
if (len > MAX_MESSAGE_SIZE)
{
_LOGE("The size of message (%d) has exceeded the maximum limit.", len);
+
+ delete pMsg;
return MESSAGEPORT_ERROR_MAX_EXCEEDED;
}
@@ -531,6 +532,7 @@ MessagePortProxy::IsLocalPortRegisted(const string& localPort, bool trusted, int
}
else
{
+ _LOGI("MessagePort name is already registered.");
for (map<int, string>::iterator it = __ids.begin(); it != __ids.end(); ++it)
{
if (localPort.compare(it->second) == 0)
@@ -550,7 +552,8 @@ MessagePortProxy::IsLocalPortRegisted(const string& localPort, bool trusted, int
}
else
{
- for (map<int, string>::iterator it = __ids.begin(); it != __trustedIds.end(); ++it)
+ _LOGI("MessagePort name is already registered.");
+ for (map<int, string>::iterator it = __trustedIds.begin(); it != __trustedIds.end(); ++it)
{
if (localPort.compare(it->second) == 0)
{
@@ -575,7 +578,7 @@ MessagePortProxy::OnSendMessageInternal(const BundleBuffer& metadata, const Bund
string messageType = bundle_get_val(b, MESSAGE_TYPE);
- _LOGD("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;
@@ -604,7 +607,7 @@ MessagePortProxy::OnSendMessageInternal(const BundleBuffer& metadata, const Bund
string localPort = bundle_get_val(b, LOCAL_PORT);
string trustedLocal = bundle_get_val(b, TRUSTED_LOCAL);
- _LOGD("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);
@@ -614,7 +617,7 @@ MessagePortProxy::OnSendMessageInternal(const BundleBuffer& metadata, const Bund
}
else
{
- _LOGD("No callback");
+ _LOGI("No callback");
}
bundle_free(b);
diff --git a/src/message-port-log.h b/src/message-port-log.h
index 15dc711..ea6b979 100644
--- a/src/message-port-log.h
+++ b/src/message-port-log.h
@@ -30,10 +30,10 @@ extern "C" {
#define LOG_TAG "MESSAGE_PORT"
#define _LOGE(fmt, arg...) LOGE(fmt, ##arg)
-#define _LOGD(fmt, arg...) LOGD(fmt, ##arg)
+#define _LOGI(fmt, arg...) LOGI(fmt, ##arg)
#define _SECURE_LOGE(fmt, arg...) SECURE_LOGE(fmt, ##arg)
-#define _SECURE_LOGD(fmt, arg...) SECURE_LOGD(fmt, ##arg)
+#define _SECURE_LOGI(fmt, arg...) SECURE_LOGI(fmt, ##arg)
/**
* @}