X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/7b8a26e75924ecff47d3e347eb4e2685656c728e..a77cd534c22418ec9a8a22ae42efef1a9500b193:/dnsasync.pas?ds=inline diff --git a/dnsasync.pas b/dnsasync.pas index f9fa50e..5e72cc0 100644 --- a/dnsasync.pas +++ b/dnsasync.pas @@ -12,6 +12,8 @@ unit dnsasync; {$endif} interface +{$include lcoreconfig.inc} + uses {$ifdef winasyncdns} dnswin, @@ -19,8 +21,6 @@ uses lsocket,lcore, classes,binipstuff,dnscore,btime,lcorernd; -{$include lcoreconfig.inc} - const numsock=1{$ifdef ipv6}+1{$endif}; @@ -149,7 +149,7 @@ begin if states[socketno].resultaction <> action_done then begin //we ignore packets that come after we are done if dnsserverids[socketno] >= 0 then begin - reportlag(dnsserverids[socketno],trunc((unixtimefloat-startts)*1000000)); + reportlag(dnsserverids[socketno],trunc((wintimefloat-startts)*1000000)); dnsserverids[socketno] := -1; end; { writeln('received reply');} @@ -172,7 +172,7 @@ begin result := false; if len = 0 then exit; {no packet} if sockets[socketno].state <> wsconnected then begin - startts := unixtimefloat; + startts := wintimefloat; if port = '' then port := '53'; sockets[socketno].Proto := 'udp'; sockets[socketno].ondataavailable := receivehandler; @@ -267,7 +267,7 @@ begin if overrideaf = useaf_default then begin {$ifdef ipv6} - {$ifdef mswindows}if not (usewindns and (addr = '')) then{$endif} + {$ifdef winasyncdns}if not (usewindns and (addr = '') and (overridednsserver = '')) then{$endif} initpreferredmode; {$endif} requestaf := useaf; @@ -276,7 +276,7 @@ begin end; {$ifdef winasyncdns} - if usewindns and (addr = '') then begin + if usewindns and (addr = '') and (overridednsserver = '') then begin dwas := tdnswinasync.create; dwas.onrequestdone := winrequestdone;