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:
Stefan Eissing 2025-08-07 14:18:59 +02:00 committed by Daniel Stenberg
parent fd9429cc29
commit 10e60e825c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 13 additions and 12 deletions

View file

@ -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);