mirror of
https://github.com/curl/curl.git
synced 2026-08-26 21:24:08 +03:00
select: switch to macros in uppercase
Curl_select_ready() was the former API that was replaced with Curl_select_check() a while back and the former arg setup was provided with a define (in order to leave existing code unmodified). Now we instead offer SOCKET_READABLE and SOCKET_WRITABLE for the most common shortcuts where only one socket is checked. They're also more visibly macros.
This commit is contained in:
parent
a05906190c
commit
8a6e89a9eb
22 changed files with 50 additions and 46 deletions
|
|
@ -815,7 +815,8 @@ schannel_connect_common(struct connectdata *conn, int sockindex,
|
|||
curl_socket_t readfd = ssl_connect_2_reading ==
|
||||
connssl->connecting_state ? sockfd : CURL_SOCKET_BAD;
|
||||
|
||||
what = Curl_socket_ready(readfd, writefd, nonblocking ? 0 : timeout_ms);
|
||||
what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd,
|
||||
nonblocking ? 0 : timeout_ms);
|
||||
if(what < 0) {
|
||||
/* fatal error */
|
||||
failf(data, "select/poll on SSL/TLS socket, errno: %d", SOCKERRNO);
|
||||
|
|
@ -971,8 +972,7 @@ schannel_send(struct connectdata *conn, int sockindex,
|
|||
break;
|
||||
}
|
||||
|
||||
what = Curl_socket_ready(CURL_SOCKET_BAD, conn->sock[sockindex],
|
||||
timeleft);
|
||||
what = SOCKET_WRITABLE(conn->sock[sockindex], timeleft);
|
||||
if(what < 0) {
|
||||
/* fatal error */
|
||||
failf(conn->data, "select/poll on SSL socket, errno: %d", SOCKERRNO);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue