mirror of
https://github.com/curl/curl.git
synced 2026-07-31 10:38:05 +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
|
|
@ -741,7 +741,7 @@ CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */
|
|||
*/
|
||||
}
|
||||
else {
|
||||
switch (Curl_socket_ready(sockfd, CURL_SOCKET_BAD, interval_ms)) {
|
||||
switch (SOCKET_READABLE(sockfd, interval_ms)) {
|
||||
case -1: /* select() error, stop reading */
|
||||
failf(data, "FTP response aborted due to select/poll error: %d",
|
||||
SOCKERRNO);
|
||||
|
|
@ -3165,7 +3165,7 @@ static CURLcode ftp_multi_statemach(struct connectdata *conn,
|
|||
struct ftp_conn *ftpc = &conn->proto.ftpc;
|
||||
CURLcode result = Curl_pp_statemach(&ftpc->pp, FALSE);
|
||||
|
||||
/* Check for the state outside of the Curl_socket_ready() return code checks
|
||||
/* Check for the state outside of the Curl_socket_check() return code checks
|
||||
since at times we are in fact already in this state when this function
|
||||
gets called. */
|
||||
*done = (ftpc->state == FTP_STOP) ? TRUE : FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue