[Gambas-devel] Signal 11 in DNS client [FIXED]
Ron
ron at ...572...
Mon Oct 24 13:33:15 CEST 2011
On 24-10-2011 13:25, Benoît Minisini wrote:
> Le 24/10/2011 12:49, Ron a écrit :
>> Benoit,
>>
>> Found the problem and the fix:
>>
>> ~/install/gambas/trunk/gb.net/src$ diff CDnsClient.c.org CDnsClient.c
>> 64c64,65
>> < if (read_dns_pipe( data, length) != length)
>> ---
>> >
>> > if (read(dns_r_pipe, data, length) != length)
>>
>> it was calling itself over and over again...
>>
>> I guess I'm the only one using the gambas3 gb.net dns code...?
>> This bug was there since 7th of September.
>> http://gambas.svn.sourceforge.net/viewvc/gambas/gambas/trunk/gb.net/src/CDnsClient.c?r1=3870&r2=4105&pathrev=4105
>> <http://gambas.svn.sourceforge.net/viewvc/gambas/gambas/trunk/gb.net/src/CDnsClient.c?r1=3870&r2=4105&pathrev=4105>
>>
>> Regards,
>> Ron_2nd.
>>
> Fixed in revision #4211!
>
Are you sure it's only an async only thing?
it also crashed if used without defining the async=TRUE property
(commented out), and as far as I can see on the site its defaulting to
sync then.
I haven't figured out how to use it in async mode inside my project
because I only use it to display hostnames in print output, and it's not
usable then.
PRIVATE hDNS AS DnsClient
PUBLIC SUB ResolveHost(sIP AS String) AS String
' create DNS handle
hDNS = NEW DnsClient AS "DNS"
hDNS.HostIP = sIP
' hDNS.Async = TRUE
hDNS.GetHostName()
RETURN hDNS.HostName
END
Regards,
Ron_2nd.
More information about the Devel
mailing list