Fix errno references when handling socket errors.
authorEtienne Dechamps <etienne@edechamps.fr>
Thu, 26 Jun 2014 19:42:40 +0000 (20:42 +0100)
committerEtienne Dechamps <etienne@edechamps.fr>
Thu, 26 Jun 2014 19:42:40 +0000 (20:42 +0100)
When using socket functions, "sockerrno" is supposed to be used to
retrieve the error code as opposed to "errno", so that it is translated
to the correct call on Windows (WSAGetLastError() - Windows does not
update errno on socket errors). Unfortunately, the use of sockerrno is
inconsistent throughout the tinc codebase, as errno is often used
incorrectly on socket-related calls.

This commit fixes these oversights, which improves socket error
handling on Windows.


No differences found