Add an E_INVALID_CONNECTION in _IpcClient::SendRequest()
authorSunwook Bae <sunwook45.bae@samsung.com>
Wed, 24 Jul 2013 10:53:21 +0000 (19:53 +0900)
committerSunwook Bae <sunwook45.bae@samsung.com>
Wed, 24 Jul 2013 10:53:53 +0000 (19:53 +0900)
Change-Id: I16423865db3bac8f9fc13f834ce253f1a2af1642
Signed-off-by: Sunwook Bae <sunwook45.bae@samsung.com>
src/io/FIo_IpcClient.cpp
src/io/inc/FIo_IpcClient.h

index 6e4417e..d13f7ec 100644 (file)
@@ -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;
index 7616838..2a6a062 100644 (file)
@@ -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.
         *