X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6e1f5176e05660ea0ba0ed02e423ad57e55d30e..164f091f4bb7bfd23c1f7af516327207c2193482:/src/unix/gsocket.cpp?ds=sidebyside diff --git a/src/unix/gsocket.cpp b/src/unix/gsocket.cpp index 3ea7d35fbd..f857c3c176 100644 --- a/src/unix/gsocket.cpp +++ b/src/unix/gsocket.cpp @@ -254,6 +254,7 @@ GSocket::GSocket() m_stream = true; m_gui_dependent = NULL; m_non_blocking = false; + m_reusable = false; m_timeout = 10*60*1000; /* 10 minutes * 60 sec * 1000 millisec */ m_establishing = false; @@ -923,7 +924,7 @@ GSocketEventFlags GSocket::Select(GSocketEventFlags flags) /* Do not use a static struct, Linux can garble it */ tv.tv_sec = m_timeout / 1000; - tv.tv_usec = (m_timeout % 1000) / 1000; + tv.tv_usec = (m_timeout % 1000) * 1000; FD_ZERO(&readfds); FD_ZERO(&writefds); @@ -1412,7 +1413,7 @@ void GSocket::Detected_Write() m_establishing = false; - getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (void*)&error, (int*) &len); + getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (void*)&error, &len); if (error) {