Hi there,

I've just upgraded our live555 version (from 2011.06.12 to 2012.05.17) and RTSPClient::connectToServer is failing on Windows. The following check fails:

__int const err = envir().getErrno();
if (err == EINPROGRESS || err == EWOULDBLOCK) {
    ...
}

I read Ross Finlayson's response to a previous post <http://lists.live555.com/pipermail/live-devel/2012-January/014432.html> by Jeff Shanab, where he added EWOULDBLOCK as a platform-independent solution. However, it turns out EWOULDBLOCK != WSAEWOULDBLOCK.

_winerror.h_
#define WSAEWOULDBLOCK                   10035L
_errno.h_
#define EWOULDBLOCK     140
_winsock.h / winsock2.h_
#if 0
#define EWOULDBLOCK             WSAEWOULDBLOCK

See this feedback entry <http://connect.microsoft.com/VisualStudio/feedback/details/509380/errno-h-socket-return-codes-now-inconsistent-with-wsagetlasterror> and MSDN Error Codes <http://msdn.microsoft.com/en-us/library/windows/desktop/ms737828%28v=vs.85%29.aspx>. Seems like in VS2010 they broke compatibility with Berkeley? The #if 0 is a bit of a lol. :)

There used to be a workaround in NetCommon.h ln 38, however it is now commented out in 2012.05.17:
//#define EWOULDBLOCK WSAEWOULDBLOCK

This results in Windows builds being unable to connect.As a temporary workaround, I've changed my NetCommon.h to read:
#undef EWOULDBLOCK
#define EWOULDBLOCK WSAEWOULDBLOCK
#undef EINPROGRESS
#define EINPROGRESS WSAEWOULDBLOCK
#undef EAGAIN
#define EAGAIN WSAEWOULDBLOCK
#undef EINTR
#define EINTR WSAEINTR

This appears to work again. Is this solution correct?

Thanks for your help,
Scott Taylor
immersaview.com



<http://lists.live555.com/pipermail/live-devel/2012-January/014432.html>
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to