On 12/12/13 8:08 PM, Yorkie wrote:
> In src/uv-common.c:
>
>>    memset(addr, 0, sizeof(*addr));
>>    addr->sin_family = AF_INET;
>>    addr->sin_port = htons(port);
>> -  /* TODO(bnoordhuis) Don't use inet_addr(), no good way to detect errors. */
>> -  addr->sin_addr.s_addr = inet_addr(ip);
>> -  return 0;
>> +  err = uv_inet_pton(AF_INET, ip, &(addr->sin_addr.s_addr));
>> +  if (err == 0 || err == -1) {
>> +    return errno;
>
> Thanks, fixed them, but sorry about I'm a new guy in windows programming.
>

No worries, I think I also confused you a bit :-/

I think you can apply the same fix to uv_ip6_addr. Then we'd need to 
tests with a few valid and invalid IP addresses :-)

Thanks a lot for working on this btw!


-- 
Saúl Ibarra Corretgé
http://bettercallsaghul.com