From fdd9202c3329953208a2fd7641e627cd907f24fe Mon Sep 17 00:00:00 2001 From: Sunwook Bae Date: Fri, 5 Apr 2013 21:56:53 +0900 Subject: [PATCH] Skip the size check in MessagePort Change-Id: I6a88777d9ead4b1e4b10d1ff94cf89aa00ff96b3 Signed-off-by: Sunwook Bae --- inc/FIoRemoteMessagePort.h | 8 ++++---- src/io/FIo_MessagePortProxy.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/inc/FIoRemoteMessagePort.h b/inc/FIoRemoteMessagePort.h index 2facefb..6ac2304 100644 --- a/inc/FIoRemoteMessagePort.h +++ b/inc/FIoRemoteMessagePort.h @@ -147,13 +147,13 @@ public: * * @return An error code * @param[in] pMessage A pointer to an argument map of key (String) and value (String or ByteBuffer) pair @n - * The recommended message size is under 16KB. + * The recommended message size is under 4KB. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG The message argument is not a map of key (String) and value (String or ByteBuffer) pair. * @exception E_OBJ_NOT_FOUND The message port of the target application is not found. * @exception E_MAX_EXCEEDED The size of @c pMessage has exceeded the maximum limit. * @exception E_SYSTEM The method has failed due to a severe system error. - * @remarks The recommended message size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size. + * @remarks The recommended message size is under 4KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 4KB size. */ result SendMessage(const Tizen::Base::Collection::IMap* pMessage); @@ -166,7 +166,7 @@ public: * @return An error code * @param[in] pLocalMessagePort The local message port * @param[in] pMessage A pointer to an argument map of key (String) and value (String or ByteBuffer) pair @n - * The recommended message size is under 16KB. + * The recommended message size is under 4KB. * @exception E_SUCCESS The method is successful. * @exception E_INVALID_ARG Either of the following conditions has occurred: @n * - The local message port is @c null. @n @@ -174,7 +174,7 @@ public: * @exception E_OBJ_NOT_FOUND The message port of the target application is not found. * @exception E_MAX_EXCEEDED The size of @c pMessage has exceeded the maximum limit. * @exception E_SYSTEM The method has failed due to a severe system error. - * @remarks The recommended message size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size. + * @remarks The recommended message size is under 4KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 4KB size. */ result SendMessage(const LocalMessagePort* pLocalMessagePort, const Tizen::Base::Collection::IMap* pMessage); diff --git a/src/io/FIo_MessagePortProxy.cpp b/src/io/FIo_MessagePortProxy.cpp index 3e8c9cb..0f637b5 100644 --- a/src/io/FIo_MessagePortProxy.cpp +++ b/src/io/FIo_MessagePortProxy.cpp @@ -326,7 +326,7 @@ _MessagePortProxy::SendMessage(const AppId& remoteAppId, const String& remotePor // Convert Map to bundle bundle* b = ConvertMapToBundleN(pMap, &size); SysTryReturnResult(NID_IO, b != null, E_INVALID_ARG, "The argument is invalid."); - SysTryReturnResult(NID_IO, size <= MAX_MESSAGE_SIZE, E_MAX_EXCEEDED, "The size of the message has exceeded the maximum limit."); + //SysTryReturnResult(NID_IO, size <= MAX_MESSAGE_SIZE, E_MAX_EXCEEDED, "The size of the message has exceeded the maximum limit."); unique_ptr pRemoteAppId(_StringConverter::CopyToCharArrayN(remoteAppId)); unique_ptr pRemotePort(_StringConverter::CopyToCharArrayN(remotePort)); @@ -348,6 +348,8 @@ _MessagePortProxy::SendMessage(const AppId& remoteAppId, const String& remotePor SysTryReturnResult(NID_IO, r != E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "The remote message port is not found."); SysTryReturnResult(NID_IO, r != E_CERTIFICATE_VERIFICATION_FAILED, E_CERTIFICATE_VERIFICATION_FAILED, "The target application is not signed with the same certificate."); + SysTryReturnResult(NID_IO, r != E_MAX_EXCEEDED, E_MAX_EXCEEDED, "The size of the message has exceeded the maximum limit."); + SysLogException(NID_IO, E_SYSTEM, "[E_SYSTEM] Failed to request the remote message port."); return r; @@ -380,7 +382,7 @@ _MessagePortProxy::SendMessage(const String& localPort, bool isTrustedLocal, con // Convert Map to bundle bundle* b = ConvertMapToBundleN(pMap, &size); SysTryReturnResult(NID_IO, b != null, E_INVALID_ARG, "The argument is invalid."); - SysTryReturnResult(NID_IO, size <= MAX_MESSAGE_SIZE, E_MAX_EXCEEDED, "The size of the message has exceeded the maximum limit."); + //SysTryReturnResult(NID_IO, size <= MAX_MESSAGE_SIZE, E_MAX_EXCEEDED, "The size of the message has exceeded the maximum limit."); unique_ptr pRemoteAppId(_StringConverter::CopyToCharArrayN(remoteAppId)); unique_ptr pRemotePort(_StringConverter::CopyToCharArrayN(remotePort)); -- 2.7.4