Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / test / channel_transport / udp_socket_posix.cc
index 6fc9441..355da53 100644 (file)
@@ -33,7 +33,6 @@ UdpSocketPosix::UdpSocketPosix(const int32_t id, UdpSocketManager* mgr,
                  "UdpSocketPosix::UdpSocketPosix()");
 
     _wantsIncoming = false;
-    _error = 0;
     _mgr = mgr;
 
     _id = id;
@@ -129,9 +128,8 @@ bool UdpSocketPosix::SetSockopt(int32_t level, int32_t optname,
        return true;
    }
 
-   _error = errno;
    WEBRTC_TRACE(kTraceError, kTraceTransport, _id,
-                "UdpSocketPosix::SetSockopt(), error:%d", _error);
+                "UdpSocketPosix::SetSockopt(), error:%d", errno);
    return false;
 }
 
@@ -151,9 +149,8 @@ bool UdpSocketPosix::Bind(const SocketAddress& name)
     {
         return true;
     }
-    _error = errno;
     WEBRTC_TRACE(kTraceError, kTraceTransport, _id,
-                 "UdpSocketPosix::Bind() error: %d",_error);
+                 "UdpSocketPosix::Bind() error: %d", errno);
     return false;
 }
 
@@ -165,16 +162,14 @@ int32_t UdpSocketPosix::SendTo(const int8_t* buf, int32_t len,
                         reinterpret_cast<const sockaddr*>(&to), size);
     if(retVal == SOCKET_ERROR)
     {
-        _error = errno;
         WEBRTC_TRACE(kTraceError, kTraceTransport, _id,
-                     "UdpSocketPosix::SendTo() error: %d", _error);
+                     "UdpSocketPosix::SendTo() error: %d", errno);
     }
 
     return retVal;
 }
 
 SOCKET UdpSocketPosix::GetFd() { return _socket; }
-int32_t UdpSocketPosix::GetError() { return _error; }
 
 bool UdpSocketPosix::ValidHandle()
 {