X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb43b372fb1567caf7ccfa523aca10c676ceaec4..e52f60e65236befe1a509cc3c1823607be0d2b3c:/src/common/socket.cpp diff --git a/src/common/socket.cpp b/src/common/socket.cpp index da261af97d..d6919eb2f0 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -31,6 +31,9 @@ #include #include +// Not enough OS behaviour defined for wxStubs +#ifndef __WXSTUBS__ + #include #include #include @@ -114,7 +117,7 @@ #endif #ifdef __WXMOTIF__ -#define wxAPP_CONTEXT wxTheApp->appContext +#define wxAPP_CONTEXT ((XtAppContext)wxTheApp->GetAppContext()) #endif #ifdef __WINDOWS__ @@ -1031,8 +1034,10 @@ void wxSocketBase::WantSpeedBuffer(char *buffer, size_t nbytes, if (ret < 0) { m_lcount = 0; m_error = errno; - } else + } else { m_lcount = ret; + m_error = 0; + } } void wxSocketBase::WantBuffer(char *buffer, size_t nbytes, @@ -1243,9 +1248,9 @@ bool wxSocketClient::Connect(wxSockAddress& addr_man, bool WXUNUSED(wait) ) return TRUE; } -bool wxSocketClient::WaitOnConnect(long seconds) +bool wxSocketClient::WaitOnConnect(long seconds, long microseconds) { - int ret = _Wait(seconds, 0, REQ_CONNECT | REQ_LOST); + int ret = _Wait(seconds, microseconds, REQ_CONNECT | REQ_LOST); if (ret) m_connected = TRUE; @@ -1537,3 +1542,6 @@ HWND wxSocketHandler::GetHWND() const } #endif + +#endif + // __WXSTUBS__