Differences From Artifact [995314850c]:
- File src/OFDNSResolverSettings.m — part of check-in [f4ba103dc0] at 2020-05-28 21:14:14 on branch trunk — Work around new libctru using id as parameter name (user: js, size: 13598) [annotate] [blame] [check-ins using] [more...]
To 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...]
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #ifdef OF_WINDOWS # import "OFWindowsRegistryKey.h" #endif #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" #import "OFOutOfMemoryException.h" #ifdef OF_WINDOWS # define interface struct # include <iphlpapi.h> # undef interface #endif | > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #ifdef OF_WINDOWS # import "OFWindowsRegistryKey.h" #endif #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #ifdef OF_WINDOWS # define interface struct # include <iphlpapi.h> # undef interface #endif |
︙ | ︙ | |||
234 235 236 237 238 239 240 241 242 243 | } # if !defined(OF_WINDOWS) && !defined(OF_AMIGAOS4) - (void)parseResolvConfOption: (OFString *)option { @try { if ([option hasPrefix: @"ndots:"]) { option = [option substringWithRange: of_range(6, option.length - 6)]; | > > > > > > | < | > > > > > > | | | 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | } # if !defined(OF_WINDOWS) && !defined(OF_AMIGAOS4) - (void)parseResolvConfOption: (OFString *)option { @try { if ([option hasPrefix: @"ndots:"]) { unsigned long long number; option = [option substringWithRange: of_range(6, option.length - 6)]; number = option.unsignedLongLongValue; if (number > UINT_MAX) @throw [OFOutOfRangeException exception]; _minNumberOfDotsInAbsoluteName = (unsigned int)number; } else if ([option hasPrefix: @"timeout:"]) { option = [option substringWithRange: of_range(8, option.length - 8)]; _timeout = option.unsignedLongLongValue; } else if ([option hasPrefix: @"attempts:"]) { unsigned long long number; option = [option substringWithRange: of_range(9, option.length - 9)]; number = option.unsignedLongLongValue; if (number > UINT_MAX) @throw [OFOutOfRangeException exception]; _maxAttempts = (unsigned int)number; } else if ([option hasPrefix: @"reload-period:"]) { option = [option substringWithRange: of_range(14, option.length - 14)]; _configReloadInterval = option.unsignedLongLongValue; } else if ([option isEqual: @"tcp"]) _usesTCP = true; } @catch (OFInvalidFormatException *e) { } } - (void)parseResolvConf: (OFString *)path |
︙ | ︙ |