mirror of https://github.com/moparisthebest/curl
Dirk Manske fixed a flaw in the setting of the socket to non-blocking
This commit is contained in:
parent
e5641a33bb
commit
663d2080d1
|
@ -5,6 +5,10 @@ doesn't want these improvements.
|
||||||
The package is called 'c-ares' for now since I (Daniel Stenberg) want this for
|
The package is called 'c-ares' for now since I (Daniel Stenberg) want this for
|
||||||
use within the curl project (hence the letter C) and it makes a nice pun.
|
use within the curl project (hence the letter C) and it makes a nice pun.
|
||||||
|
|
||||||
|
* January 29, 2004:
|
||||||
|
|
||||||
|
- Dirk Manske fixed how the socket is set non-blocking.
|
||||||
|
|
||||||
* January 4, 2004:
|
* January 4, 2004:
|
||||||
|
|
||||||
- Dominick Meglio made the private gettimeofday() become ares_gettimeofday()
|
- Dominick Meglio made the private gettimeofday() become ares_gettimeofday()
|
||||||
|
|
|
@ -464,12 +464,14 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
||||||
flags = 1;
|
flags = 1;
|
||||||
ioctlsocket(s, FIONBIO, &flags);
|
ioctlsocket(s, FIONBIO, &flags);
|
||||||
#else
|
#else
|
||||||
if (fcntl(s, F_GETFL, &flags) == -1)
|
flags = fcntl(s, F_GETFL, 0);
|
||||||
|
|
||||||
|
if (flags == -1)
|
||||||
{
|
{
|
||||||
close(s);
|
close(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
flags &= O_NONBLOCK;
|
flags |= O_NONBLOCK;
|
||||||
if (fcntl(s, F_SETFL, flags) == -1)
|
if (fcntl(s, F_SETFL, flags) == -1)
|
||||||
{
|
{
|
||||||
close(s);
|
close(s);
|
||||||
|
|
Loading…
Reference in New Issue