\r
function tdnsasync.sendquery(socketno:integer;const packet:tdnspacket;len:integer):boolean;\r
var\r
- destination : ansistring;\r
+ destination : tbinip;\r
inaddr : tinetsockaddrv;\r
trytolisten:integer;\r
begin\r
end;\r
if addr <> '' then begin\r
dnsserverids[socketno] := -1;\r
- destination := addr\r
+ destination := ipstrtobinf(addr);\r
end else begin\r
- destination := getcurrentsystemnameserver(dnsserverids[socketno]);\r
+ destination := getcurrentsystemnameserverbin(dnsserverids[socketno]);\r
end;\r
- destinations[socketno] := ipstrtobinf(destination);\r
+ destinations[socketno] := destination;\r
\r
{$ifdef ipv6}{$ifdef win32}\r
if destinations[socketno].family = AF_INET6 then if (requestaf = useaf_default) then requestaf := useaf_preferv6;\r
exit;\r
end;\r
\r
- if (overridednsserver <> '') and (addr = '') then addr := overridednsserver;\r
-\r
if overrideaf = useaf_default then begin\r
{$ifdef ipv6}\r
{$ifdef win32}if not (usewindns and (addr = '')) then{$endif}\r
\r
procedure tdnsasync.reverselookup;\r
begin\r
- if (overridednsserver <> '') and (addr = '') then addr := overridednsserver;\r
{$ifdef win32}\r
if usewindns and (addr = '') then begin\r
dwas := tdnswinasync.create;\r
\r
procedure tdnsasync.customlookup;\r
begin\r
- if (overridednsserver <> '') and (addr = '') then addr := overridednsserver;\r
setstate_custom(name,querytype,states[0]);\r
numsockused := 1;\r
asyncprocess(0);\r