X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/31d4361fb52761b6486f55af10268a51ee536a6f..eaa75975b23ce60360526c08628f2b0651c95167:/dnsasync.pas diff --git a/dnsasync.pas b/dnsasync.pas index 4efc205..b6e8941 100644 --- a/dnsasync.pas +++ b/dnsasync.pas @@ -153,7 +153,7 @@ end; function tdnsasync.sendquery(socketno:integer;const packet:tdnspacket;len:integer):boolean; var - destination : ansistring; + destination : tbinip; inaddr : tinetsockaddrv; trytolisten:integer; begin @@ -185,11 +185,11 @@ begin end; if addr <> '' then begin dnsserverids[socketno] := -1; - destination := addr + destination := ipstrtobinf(addr); end else begin - destination := getcurrentsystemnameserver(dnsserverids[socketno]); + destination := getcurrentsystemnameserverbin(dnsserverids[socketno]); end; - destinations[socketno] := ipstrtobinf(destination); + destinations[socketno] := destination; {$ifdef ipv6}{$ifdef win32} if destinations[socketno].family = AF_INET6 then if (requestaf = useaf_default) then requestaf := useaf_preferv6; @@ -255,8 +255,6 @@ begin exit; end; - if (overridednsserver <> '') and (addr = '') then addr := overridednsserver; - if overrideaf = useaf_default then begin {$ifdef ipv6} {$ifdef win32}if not (usewindns and (addr = '')) then{$endif} @@ -299,7 +297,6 @@ end; procedure tdnsasync.reverselookup; begin - if (overridednsserver <> '') and (addr = '') then addr := overridednsserver; {$ifdef win32} if usewindns and (addr = '') then begin dwas := tdnswinasync.create; @@ -316,7 +313,6 @@ end; procedure tdnsasync.customlookup; begin - if (overridednsserver <> '') and (addr = '') then addr := overridednsserver; setstate_custom(name,querytype,states[0]); numsockused := 1; asyncprocess(0);