X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fio%2FFIo_MessagePortProxy.cpp;h=1252927531e75f3c265121a81f1b190f44efdade;hb=cb33bec6436074d611d398a93e0b78437142cc52;hp=d2e32fbe183e80fa90521ab40f2052889ec6ed38;hpb=1863c30d6f14733b76565358071507cc83dec8a3;p=platform%2Fframework%2Fnative%2Fappfw.git diff --git a/src/io/FIo_MessagePortProxy.cpp b/src/io/FIo_MessagePortProxy.cpp index d2e32fb..1252927 100644 --- a/src/io/FIo_MessagePortProxy.cpp +++ b/src/io/FIo_MessagePortProxy.cpp @@ -1,5 +1,4 @@ // -// Open Service Platform // Copyright (c) 2012 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); @@ -25,11 +24,11 @@ #include #include -#include - #include #include +#include + #include #include @@ -46,7 +45,7 @@ using namespace Tizen::Base::Runtime; namespace Tizen { namespace Io { -static const int MAX_MESSAGE_SIZE = 16 * 1024; +//static const int MAX_MESSAGE_SIZE = 16 * 1024; static void ConvertBundleToMap(const char *pKey, const int type, const bundle_keyval_t *pVal, void *pData) @@ -232,7 +231,6 @@ _MessagePortProxy::RegisterMessagePort(const String& localPort, bool isTrusted, { SysSecureLog(NID_IO, "Register a message port : [%ls:%ls]", __appId.GetPointer(), localPort.GetPointer()); - result r = E_SUCCESS; int ret = 0; bool contain = false; @@ -348,6 +346,11 @@ _MessagePortProxy::SendMessage(const AppId& remoteAppId, const String& remotePor if (ret < 0) { + if (ret == MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE) + { + SysLogException(NID_IO, E_SYSTEM, "[E_SYSTEM] The socket receiver queue of remote port is temporarily full."); + } + result r = ConvertToResult(ret); SysTryReturnResult(NID_IO, r != E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "The remote message port is not found."); @@ -405,6 +408,11 @@ _MessagePortProxy::SendMessage(const String& localPort, bool isTrustedLocal, con if (ret < 0) { + if (ret == MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE) + { + SysLogException(NID_IO, E_SYSTEM, "[E_SYSTEM] The socket receiver queue of remote port is temporarily full."); + } + result r = ConvertToResult(ret); SysTryReturnResult(NID_IO, r != E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "The remote message port is not found."); @@ -464,6 +472,9 @@ _MessagePortProxy::ConvertToResult(int error) case MESSAGEPORT_ERROR_MAX_EXCEEDED: return E_MAX_EXCEEDED; + case MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE: + // fall through + default: return E_SYSTEM; }