Differences From Artifact [90b01a441b]:
- File src/OFDNSResolver.m — part of check-in [7050b3a480] at 2018-08-19 23:50:51 on branch trunk — OFDNSResolver: Do not allow IPs as local domain (user: js, size: 41624) [annotate] [blame] [check-ins using]
To Artifact [fc33672140]:
- File
src/OFDNSResolver.m
— part of check-in
[40bf53792d]
at
2018-08-20 01:24:44
on branch trunk
— OFDNSResolver: Do not use gethostname() on Wii
It's in the headers, but the symbol is missing. (user: js, size: 41668) [annotate] [blame] [check-ins using]
︙ | |||
191 192 193 194 195 196 197 198 199 200 201 202 203 204 | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | + | didReceiveIntoBuffer: (unsigned char *)buffer length: (size_t)length sender: (of_socket_address_t)sender context: (id)context exception: (id)exception; @end #ifndef OF_WII static OFString * domainFromHostname(void) { char hostname[256]; OFString *domain; if (gethostname(hostname, 256) != 0) |
︙ | |||
222 223 224 225 226 227 228 229 230 231 232 233 234 235 | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | + | if (pos == OF_NOT_FOUND) return nil; return [domain substringWithRange: of_range(pos + 1, [domain length] - pos - 1)]; } } #endif static bool isFQDN(OFString *host, OFDNSResolverSettings *settings) { const char *UTF8String = [host UTF8String]; size_t length = [host UTF8StringLength]; unsigned int dots = 0; |
︙ | |||
853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 | 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 | + + | #ifdef OF_HAVE_IPV6 _nameServers = [[OFArray alloc] initWithObjects: @"127.0.0.1", @"::1", nil]; #else _nameServers = [[OFArray alloc] initWithObject: @"127.0.0.1"]; #endif #ifndef OF_WII if (_localDomain == nil) _localDomain = [domainFromHostname() copy]; #endif if (_searchDomains == nil) { if (_localDomain != nil) _searchDomains = [[OFArray alloc] initWithObject: _localDomain]; else _searchDomains = [[OFArray alloc] init]; |
︙ |