summaryrefslogtreecommitdiff
path: root/lib/http_proxy.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-10-18 10:58:58 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-10-18 11:05:45 +0200
commit8a6e89a9ebbaa79a2c4e4301774770efb3d24ef7 (patch)
treee1f5912ef215b364a0be7c0609f343070ecc6efb /lib/http_proxy.c
parenta05906190ca6f7d6135f82595107bcabe4b75c77 (diff)
downloadcurl-8a6e89a9ebbaa79a2c4e4301774770efb3d24ef7.tar.gz
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.
Diffstat (limited to 'lib/http_proxy.c')
-rw-r--r--lib/http_proxy.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index 082b73ad7..faee4dbda 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -245,7 +245,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
}
if(!blocking) {
- if(0 == Curl_socket_ready(tunnelsocket, CURL_SOCKET_BAD, 0))
+ if(0 == SOCKET_READABLE(tunnelsocket, 0))
/* return so we'll be called again polling-style */
return CURLE_OK;
else {
@@ -280,8 +280,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn,
}
/* loop every second at least, less if the timeout is near */
- switch (Curl_socket_ready(tunnelsocket, CURL_SOCKET_BAD,
- check<1000L?check:1000)) {
+ switch (SOCKET_READABLE(tunnelsocket, check<1000L?check:1000)) {
case -1: /* select() error, stop reading */
error = SELECT_ERROR;
failf(data, "Proxy CONNECT aborted due to select/poll error");