X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/6cb6b7ede2d178e03fa817bc28474c175f5a93b9..1e45a1f0bf2ab89879ac9855b76ddfed1c406c3f:/dnswin.pas?ds=inline diff --git a/dnswin.pas b/dnswin.pas index ffe472b..19eabe4 100755 --- a/dnswin.pas +++ b/dnswin.pas @@ -20,7 +20,6 @@ type //release should only be called from the main thread tdnswinasync=class(tthread) private - ipv6preffered : boolean; freverse : boolean; error : integer; freewhendone : boolean; @@ -30,9 +29,9 @@ type public onrequestdone:tsocketevent; name : string; - ip : tbinip; + iplist : tbiniplist; - procedure forwardlookup(name:string;ipv6preffered:boolean); + procedure forwardlookup(name:string); procedure reverselookup(ip:tbinip); destructor destroy; override; procedure release; @@ -281,16 +280,16 @@ begin end; end; -procedure tdnswinasync.forwardlookup(name:string;ipv6preffered:boolean); +procedure tdnswinasync.forwardlookup(name:string); begin self.name := name; - self.ipv6preffered := ipv6preffered; freverse := false; resume; end; procedure tdnswinasync.reverselookup(ip:tbinip); begin - self.ip := ip; + iplist := biniplist_new; + biniplist_add(iplist,ip); freverse := true; resume; end; @@ -298,14 +297,14 @@ end; procedure tdnswinasync.execute; var error : integer; - l:tbiniplist; + begin error := 0; if reverse then begin - name := winreverselookup(ip,error); + name := winreverselookup(biniplist_get(iplist,0),error); end else begin - l := winforwardlookuplist(name,0,error); - ip := biniplist_get(l,0); + iplist := winforwardlookuplist(name,0,error); + end; postmessage(hwnddnswin,wm_user,error,taddrint(self)); end;