Differences From Artifact [1037374b48]:
- File src/resolver.m — part of check-in [fab07a40ca] at 2014-02-12 03:17:01 on branch trunk — Fix compilation with mingw32 (user: js, size: 7506) [annotate] [blame] [check-ins using]
To Artifact [f6383b3c0c]:
- File
src/resolver.m
— part of check-in
[fae85e954f]
at
2014-02-27 22:40:33
on branch trunk
— Allow thread-unsafe getaddrinfo() with locks
Before, getaddrinfo() would not be used at all if it is not thread-safe. (user: js, size: 7805) [annotate] [blame] [check-ins using]
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - + + + + + + | of_resolver_result_t** of_resolve_host(OFString *host, uint16_t port, int type) { of_resolver_result_t **ret, **retIter; of_resolver_result_t *results, *resultsIter; size_t count; |
︙ | |||
99 100 101 102 103 104 105 106 107 108 109 110 111 112 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | + + + + + | resultsIter->addressLength = res->ai_addrlen; *retIter = resultsIter; } *retIter = NULL; ret[0]->private_ = res0; # if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(OF_HAVE_THREADS) if (!of_mutex_unlock(&mutex)) @throw [OFUnlockFailedException exception]; # endif #else struct hostent *he; in_addr_t s_addr; char **ip; struct sockaddr_in *addrs, *addrsIter; /* |
︙ |