Differences From Artifact [1a84838633]:
- File src/OFDNSResolverSettings.m — part of check-in [0ceb5bb869] at 2022-11-06 20:20:25 on branch trunk — OFDNSResolverSettings: Use native encoding (user: js, size: 16671) [annotate] [blame] [check-ins using] [more...]
To Artifact [179fc83ef4]:
- File
src/OFDNSResolverSettings.m
— part of check-in
[ce2b268163]
at
2023-04-17 11:56:02
on branch trunk
— Always make DNS names lowercase
This avoids problems when comparing them. (user: js, size: 17103) [annotate] [blame] [check-ins using] [more...]
1 | 1 2 3 4 5 6 7 8 9 | - + | /* |
︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + + + + | #import "OFString.h" #ifdef OF_WINDOWS # import "OFWindowsRegistryKey.h" #endif #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" #ifdef OF_WINDOWS # import "OFOpenWindowsRegistryKeyFailedException.h" #endif #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "OFUndefinedKeyException.h" #ifdef OF_WINDOWS # define interface struct # include <iphlpapi.h> # undef interface #endif |
︙ | |||
209 210 211 212 213 214 215 | 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | - + | copy->_nameServers = [_nameServers copy]; copy->_localDomain = [_localDomain copy]; copy->_searchDomains = [_searchDomains copy]; copy->_timeout = _timeout; copy->_maxAttempts = _maxAttempts; copy->_minNumberOfDotsInAbsoluteName = _minNumberOfDotsInAbsoluteName; |
︙ | |||
237 238 239 240 241 242 243 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | - + | [_searchDomains release]; _searchDomains = nil; _timeout = 2; _maxAttempts = 3; _minNumberOfDotsInAbsoluteName = 1; |
︙ | |||
286 287 288 289 290 291 292 | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | - - + + + + | continue; address = components.firstObject; hosts = [components objectsInRange: OFMakeRange(1, components.count - 1)]; for (OFString *host in hosts) { |
︙ | |||
339 340 341 342 343 344 345 | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | - + | _maxAttempts = (unsigned int)number; } else if ([option hasPrefix: @"reload-period:"]) { option = [option substringFromIndex: 14]; _configReloadInterval = option.unsignedLongLongValue; } else if ([option isEqual: @"tcp"]) |
︙ | |||
443 444 445 446 447 448 449 | 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | - - + + + - + + + + + | PIP_ADDR_STRING iter; if (GetNetworkParams(fixedInfo, &length) != ERROR_SUCCESS) return; nameServers = [OFMutableArray array]; |
︙ | |||
489 490 491 492 493 494 495 | 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | - - + + + + | continue; address = components.firstObject; hosts = [components objectsInRange: OFMakeRange(1, components.count - 1)]; for (OFString *host in hosts) { |
︙ | |||
598 599 600 601 602 603 604 | 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 | - - + + + - - - - - - - - + + + + + + + + + + + + + + + | _nameServers = [nameServers copy]; } } #endif - (void)reload { |
︙ |