[Bug 31621] file transfer not working

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Feb 3 12:32:07 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=31621

--- Comment #9 from Thomas Flüeli <tflueeli at gmail.com> 2011-02-03 03:32:05 PST ---
Created an attachment (id=42896)
 View: https://bugs.freedesktop.org/attachment.cgi?id=42896
 Review: https://bugs.freedesktop.org/review?bug=31621&attachment=42896

fix TCP connection establishment on Windows

This patch takes into account the behavior of connect() on Windows. Quote from
MSDN:

"Until the connection attempt completes on a nonblocking socket, all subsequent
calls to connect on the same socket will fail with the error code WSAEALREADY,
and WSAEISCONN when the connection completes successfully. Due to ambiguities
in version 1.1 of the Windows Sockets specification, error codes returned from
connect while a connection is already pending may vary among implementations.
As a result, it is not recommended that applications use multiple calls to
connect to detect connection completion. If they do, they must be prepared to
handle WSAEINVAL and WSAEWOULDBLOCK error values the same way that they handle
WSAEALREADY, to assure robust operation."

The patch itself is rather ugly. This is due the fact that WSAGetLastError()
cannot be called twice. But I tried to not clutter the code too much with
ifdefs.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list