Differences From Artifact [d1d2c810b6]:
- File
src/resolver.m
— part of check-in
[898f8c7072]
at
2014-03-04 23:53:48
on branch trunk
— resolver.m: Fix locking
A lock for thread-unsafe getaddrinfo was missing and not all locks were
unlocked / all buffers free'd if an error occurred. (user: js, size: 8392) [annotate] [blame] [check-ins using]
To Artifact [f9485d971c]:
- File
src/resolver.m
— part of check-in
[4e59d2692f]
at
2014-04-26 00:40:17
on branch trunk
— Fix a few issues on LLP64 and Win64
LLP64 was mostly fast enumeration using an unsigned long for the state,
which can't store a pointer or a size_t on LLP64. This is now solved by
either throwing an OFOutOfRangeException if the value of the size_t is
bigger than ULONG_MAX or storing the pointer in the extra field (copied
using memcpy, as it's an array of unsigned long, which again would be
too small to store a pointer).Win64 was mostly Microsoft not being able to decide whether a length is
a size_t, a DWORD, an int or an unsigned int (thus the different types
in places that seem to be almost the same). But since that would not be
confusing enough, a file descriptor is an int if it's for a file, but a
long long if it is for a socket. But of course, for ReadFile and friends
it's a DWORD instead of an int then. (user: js, size: 8403) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
105 106 107 108 109 110 111 | for (retIter = ret, resultsIter = results, res = res0; res != NULL; retIter++, resultsIter++, res = res->ai_next) { resultsIter->family = res->ai_family; resultsIter->type = res->ai_socktype; resultsIter->protocol = res->ai_protocol; resultsIter->address = res->ai_addr; | | | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | for (retIter = ret, resultsIter = results, res = res0; res != NULL; retIter++, resultsIter++, res = res->ai_next) { resultsIter->family = res->ai_family; resultsIter->type = res->ai_socktype; resultsIter->protocol = res->ai_protocol; resultsIter->address = res->ai_addr; resultsIter->addressLength = (socklen_t)res->ai_addrlen; *retIter = resultsIter; } *retIter = NULL; ret[0]->private_ = res0; # if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(OF_HAVE_THREADS) |
︙ | ︙ |