Differences From Artifact [aa15389045]:
- File
src/OFDNSResolverSettings.m
— part of check-in
[b6ee372b98]
at
2020-08-11 19:45:36
on branch trunk
— OFString: Rework number parsing API
This solves the old signed vs. unsigned problem and allows for more
bases than just 8, 10 and 16, as well as auto-detection of the base (if
base is 0). (user: js, size: 13909) [annotate] [blame] [check-ins using] [more...]
To Artifact [92fa7c4194]:
- File src/OFDNSResolverSettings.m — part of check-in [cbc09c6e26] at 2020-09-27 00:57:30 on branch trunk — Work around bugs in Apple GCC 4.2.1 (user: js, size: 13928) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
68 69 70 71 72 73 74 |
#endif
#ifndef OF_WII
static OFString *
domainFromHostname(void)
{
char hostname[256];
| | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
#endif
#ifndef OF_WII
static OFString *
domainFromHostname(void)
{
char hostname[256];
OFString *domain, *ret;
if (gethostname(hostname, 256) != 0)
return nil;
domain = [OFString stringWithCString: hostname
encoding: [OFLocale encoding]];
|
| ︙ | ︙ | |||
91 92 93 94 95 96 97 |
} @catch (OFInvalidFormatException *e) {
/* Not an IP address -> we can use it if it contains a dot. */
size_t pos = [domain rangeOfString: @"."].location;
if (pos == OF_NOT_FOUND)
return nil;
| | > > | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
} @catch (OFInvalidFormatException *e) {
/* Not an IP address -> we can use it if it contains a dot. */
size_t pos = [domain rangeOfString: @"."].location;
if (pos == OF_NOT_FOUND)
return nil;
ret = [domain substringWithRange:
of_range(pos + 1, domain.length - pos - 1)];
}
return ret;
}
#endif
@implementation OFDNSResolverSettings
- (void)dealloc
{
[_staticHosts release];
|
| ︙ | ︙ |