From: Sunwook Bae Date: Wed, 24 Jul 2013 10:53:21 +0000 (+0900) Subject: Add an E_INVALID_CONNECTION in _IpcClient::SendRequest() X-Git-Tag: accepted/tizen/20130912.081851^2~82 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e359cab53dd4031b08b3cd6effada1dd0edac404;p=platform%2Fframework%2Fnative%2Fappfw.git Add an E_INVALID_CONNECTION in _IpcClient::SendRequest() Change-Id: I16423865db3bac8f9fc13f834ce253f1a2af1642 Signed-off-by: Sunwook Bae --- diff --git a/src/io/FIo_IpcClient.cpp b/src/io/FIo_IpcClient.cpp index 6e4417e..d13f7ec 100644 --- a/src/io/FIo_IpcClient.cpp +++ b/src/io/FIo_IpcClient.cpp @@ -502,6 +502,11 @@ _IpcClient::SendAsync(IPC::Message* pMessage) SysLogException(NID_IO, E_RESOURCE_UNAVAILABLE, "[E_RESOURCE_UNAVAILABLE] The socket buffer is full."); return E_RESOURCE_UNAVAILABLE; } + else if (errno == EPIPE) + { + SysLogException(NID_IO, E_INVALID_CONNECTION, "[E_INVALID_CONNECTION] The socket connection is closed."); + return E_INVALID_CONNECTION; + } SysLogException(NID_IO, E_SYSTEM, "[E_SYSTEM] Failed to send a request: %d, %s", errno, strerror(errno)); return E_SYSTEM; @@ -558,6 +563,11 @@ _IpcClient::SendSync(IPC::Message* pMessage) SysLogException(NID_IO, E_RESOURCE_UNAVAILABLE, "[E_RESOURCE_UNAVAILABLE] The socket buffer is full."); return E_RESOURCE_UNAVAILABLE; } + else if (errno == EPIPE) + { + SysLogException(NID_IO, E_INVALID_CONNECTION, "[E_INVALID_CONNECTION] The socket connection is closed."); + return E_INVALID_CONNECTION; + } SysLogException(NID_IO, E_SYSTEM, "[E_SYSTEM] Failed to send a request: %d, %s", errno, strerror(errno)); return E_SYSTEM; diff --git a/src/io/inc/FIo_IpcClient.h b/src/io/inc/FIo_IpcClient.h index 7616838..2a6a062 100644 --- a/src/io/inc/FIo_IpcClient.h +++ b/src/io/inc/FIo_IpcClient.h @@ -68,7 +68,6 @@ public: * @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. */ @@ -102,8 +101,8 @@ public: * @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_RESOURCE_UNAVAILABLE The socket buffer is full. + * @exception E_INVALID_CONNECTION The socket connection is closed. * @exception E_OUT_OF_MEMORY Insufficient memory. * @exception E_SYSTEM A system error occurred. *