Use non-blocking mode socket 43/17543/1
authorHaifeng Deng <haifeng.deng@samsung.com>
Wed, 4 Sep 2013 07:59:21 +0000 (15:59 +0800)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 7 Mar 2014 02:27:22 +0000 (11:27 +0900)
Change-Id: I0cffd699b0c432fd20853555cc5804e5ba4c2d26

ism/src/scim_helper.cpp
ism/src/scim_panel_agent.cpp
ism/src/scim_socket.cpp

index 8dd5363..075f039 100644 (file)
@@ -291,9 +291,6 @@ HelperAgent::open_connection (const HelperInfo &info,
         return -1;
     }
 
-    if (m_impl->socket_active.set_nonblock_mode () == -1)
-        std::cerr << __func__ << " socket_active.set_nonblock_mode () is failed!!!\n";
-
     m_impl->magic_active = magic;
 
     m_impl->send.clear ();
index c3d6683..f3d6148 100644 (file)
@@ -3399,9 +3399,6 @@ private:
                 m_pending_active_imcontrol_id = -1;
             }
 
-            if (const_cast<Socket &>(client).set_nonblock_mode () == -1)
-                std::cerr << __func__ << " client.set_nonblock_mode () is failed!!!\n";
-
             unlock ();
             return true;
         }
index c1d91ef..a141025 100644 (file)
@@ -1405,7 +1405,8 @@ scim_socket_open_connection   (uint32       &key,
     trans.put_command (SCIM_TRANS_CMD_OPEN_CONNECTION);
     trans.put_data (String (SCIM_BINARY_VERSION));
     trans.put_data (client_type);
-
+    if (const_cast<Socket &>(socket).set_nonblock_mode () == -1)
+        std::cerr << __func__ << "set_nonblock_mode () is failed!!!\n";
     if (trans.write_to_socket (socket)) {
         int cmd;
         String server_types;
@@ -1440,7 +1441,8 @@ scim_socket_accept_connection (uint32       &key,
         return String ("");
 
     Transaction trans;
-
+    if (const_cast<Socket &>(socket).set_nonblock_mode () == -1)
+        std::cerr << __func__ << "set_nonblock_mode () is failed!!!\n";
     if (trans.read_from_socket (socket, timeout)) {
         int cmd;
         String version;