mirror of
https://github.com/curl/curl.git
synced 2026-07-26 00:27:16 +03:00
cfilters: make Curl_conn_get_socket simpler
Since it is only used for the first socket anyway, simplify the function. Closes #18219
This commit is contained in:
parent
fd9429cc29
commit
10e60e825c
4 changed files with 13 additions and 12 deletions
|
|
@ -912,7 +912,7 @@ static CURLcode mstate_connecting_pollset(struct Curl_easy *data,
|
|||
struct easy_pollset *ps)
|
||||
{
|
||||
if(data->conn) {
|
||||
curl_socket_t sockfd = Curl_conn_get_socket(data, FIRSTSOCKET);
|
||||
curl_socket_t sockfd = Curl_conn_get_first_socket(data);
|
||||
if(sockfd != CURL_SOCKET_BAD) {
|
||||
/* Default is to wait to something from the server */
|
||||
return Curl_pollset_change(data, ps, sockfd, CURL_POLL_IN, 0);
|
||||
|
|
@ -928,7 +928,7 @@ static CURLcode mstate_protocol_pollset(struct Curl_easy *data,
|
|||
curl_socket_t sockfd;
|
||||
if(data->conn->handler->proto_pollset)
|
||||
return data->conn->handler->proto_pollset(data, ps);
|
||||
sockfd = Curl_conn_get_socket(data, FIRSTSOCKET);
|
||||
sockfd = data->conn->sock[FIRSTSOCKET];
|
||||
if(sockfd != CURL_SOCKET_BAD) {
|
||||
/* Default is to wait to something from the server */
|
||||
return Curl_pollset_change(data, ps, sockfd, CURL_POLL_IN, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue