From 4ee5f77116ba97e8588a7c4c329ee427e9147068 Mon Sep 17 00:00:00 2001 From: Hyunbin Lee Date: Tue, 19 Nov 2013 14:41:52 +0900 Subject: [PATCH] Add error type Change-Id: I92f74c1c9ef5e4492bca78144214989fac16ec1f Signed-off-by: Hyunbin Lee --- include/message-port.h | 1 + src/MessagePortProxy.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/message-port.h b/include/message-port.h index 6b194f9..aa10b99 100755 --- a/include/message-port.h +++ b/include/message-port.h @@ -45,6 +45,7 @@ typedef enum MESSAGEPORT_ERROR_MESSAGEPORT_NOT_FOUND = -4, /**< The message port of the remote application is not found */ MESSAGEPORT_ERROR_CERTIFICATE_NOT_MATCH = -5, /**< The remote application is not signed with the same certificate */ MESSAGEPORT_ERROR_MAX_EXCEEDED = -6, /**< The size of message has exceeded the maximum limit */ + MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE = -7, /**< Resource temporarily unavailable */ } messageport_error_e; diff --git a/src/MessagePortProxy.cpp b/src/MessagePortProxy.cpp index 0ff878d..0f40e53 100644 --- a/src/MessagePortProxy.cpp +++ b/src/MessagePortProxy.cpp @@ -411,6 +411,12 @@ MessagePortProxy::SendMessageInternal(const BundleBuffer& metadata, const Bundle return MESSAGEPORT_ERROR_CERTIFICATE_NOT_MATCH; } + else if (return_value == MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE) + { + _LOGE("The socket receiver buffer of remote port is temporarily full."); + + return MESSAGEPORT_ERROR_RESOURCE_UNAVAILABLE; + } else { _LOGE("Failed to check the remote messge port: %d.", return_value); -- 2.7.4