From: plugwash Date: Mon, 13 Apr 2009 00:12:13 +0000 (+0000) Subject: make dnswin use makeaddrinfov X-Git-Url: http://www.lcore.org/git/lcore.git/commitdiff_plain/40b538b4671a190ea35502207562edabfcea539b make dnswin use makeaddrinfov git-svn-id: file:///svnroot/lcore/trunk@45 b1de8a11-f9be-4011-bde0-cc7ace90066a --- diff --git a/dnswin.pas b/dnswin.pas index 19eabe4..573c888 100755 --- a/dnswin.pas +++ b/dnswin.pas @@ -233,17 +233,7 @@ var getnameinforesult : integer; begin - if ip.family = AF_INET then begin - sa.InAddr.family := AF_INET; - sa.InAddr.port := 1; - sa.InAddr.addr := ip.ip; - end else {$ifdef ipv6}if ip.family = AF_INET6 then begin - sa.InAddr6.sin6_family := AF_INET6; - sa.InAddr6.sin6_port := 1; - sa.InAddr6.sin6_addr := ip.ip6; - end else{$endif} begin - raise exception.create('unrecognised address family'); - end; + makeinaddrv(sa,ip); populateprocvars; setlength(result,1025); getnameinforesult := getnameinfo(@sa,sizeof(tinetsockaddrv),pchar(result),length(result),nil,0,0);