diff options
author | Yang Tse <yangsita@gmail.com> | 2009-06-19 00:41:03 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-06-19 00:41:03 +0000 |
commit | f34c2a879bad4465b383ecd395bce30310f62166 (patch) | |
tree | f951395ecafb89b5a3055b4fe63d6ace12328cb6 /ares_process.c | |
parent | 0757cbf7f4ddeca979a0232dcd4fb0ed44c68d17 (diff) | |
download | c-ares-f34c2a879bad4465b383ecd395bce30310f62166.tar.gz c-ares-f34c2a879bad4465b383ecd395bce30310f62166.tar.bz2 c-ares-f34c2a879bad4465b383ecd395bce30310f62166.zip |
sclose() function-like macro definition used to close a socket,
now solely based on HAVE_CLOSESOCKET and HAVE_CLOSESOCKET_CAMEL
config file preprocessor definitions.
Diffstat (limited to 'ares_process.c')
-rw-r--r-- | ares_process.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ares_process.c b/ares_process.c index c484810..41d1811 100644 --- a/ares_process.c +++ b/ares_process.c @@ -896,7 +896,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) /* Configure it. */ if (configure_socket(s, channel) < 0) { - closesocket(s); + sclose(s); return -1; } @@ -911,7 +911,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (void *)&opt, sizeof(opt)) == -1) { - closesocket(s); + sclose(s); return -1; } #endif @@ -927,7 +927,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) if (err != EINPROGRESS && err != EWOULDBLOCK) { - closesocket(s); + sclose(s); return -1; } } @@ -938,7 +938,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) channel->sock_create_cb_data); if (err < 0) { - closesocket(s); + sclose(s); return err; } } @@ -963,7 +963,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server) /* Set the socket non-blocking. */ if (configure_socket(s, channel) < 0) { - closesocket(s); + sclose(s); return -1; } @@ -978,7 +978,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server) if (err != EINPROGRESS && err != EWOULDBLOCK) { - closesocket(s); + sclose(s); return -1; } } @@ -989,7 +989,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server) channel->sock_create_cb_data); if (err < 0) { - closesocket(s); + sclose(s); return err; } } |