X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/e27ef2c6aab3a2a8051314bd37bb3b2386775f36..096e05689a95dc55ef9f554978c5ea3f263bc919:/dnsasync.pas?ds=inline 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);