← Commit list

a59a3cc7f1

Daniel Stenberg
Daniel Stenberg
2025-11-27
SUCCESS Duration: 148s

Subject

cfilters: make conn_forget_socket a private libssh function

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/cfilters.c+0 -13
@@ -931,19 +931,6 @@ Curl_conn_get_remote_addr(struct Curl_easy *data, int sockindex)
return cf ? cf_get_remote_addr(cf, data) : NULL;
}
-void Curl_conn_forget_socket(struct Curl_easy *data, int sockindex)
-{
- struct connectdata *conn = data->conn;
- if(conn && CONN_SOCK_IDX_VALID(sockindex)) {
- struct Curl_cfilter *cf = conn->cfilter[sockindex];
- if(cf)
- (void)Curl_conn_cf_cntrl(cf, data, TRUE,
- CF_CTRL_FORGET_SOCKET, 0, NULL);
- fake_sclose(conn->sock[sockindex]);
- conn->sock[sockindex] = CURL_SOCKET_BAD;
- }
-}
-
static CURLcode cf_cntrl_all(struct connectdata *conn,
struct Curl_easy *data,
bool ignore_result,
lib/vssh/libssh.c+14 -1
@@ -1874,6 +1874,19 @@ static int myssh_in_SFTP_QUOTE_STAT(struct Curl_easy *data,
return SSH_NO_ERROR;
}
+static void conn_forget_socket(struct Curl_easy *data, int sockindex)
+{
+ struct connectdata *conn = data->conn;
+ if(conn && CONN_SOCK_IDX_VALID(sockindex)) {
+ struct Curl_cfilter *cf = conn->cfilter[sockindex];
+ if(cf)
+ (void)Curl_conn_cf_cntrl(cf, data, TRUE,
+ CF_CTRL_FORGET_SOCKET, 0, NULL);
+ fake_sclose(conn->sock[sockindex]);
+ conn->sock[sockindex] = CURL_SOCKET_BAD;
+ }
+}
+
/*
* ssh_statemach_act() runs the SSH state machine as far as it can without
* blocking and without reaching the end. The data the pointer 'block' points
@@ -2376,7 +2389,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data,
/* conn->sock[FIRSTSOCKET] is closed by ssh_disconnect behind our back,
tell the connection to forget about it. This libssh
bug is fixed in 0.10.0. */
- Curl_conn_forget_socket(data, FIRSTSOCKET);
+ conn_forget_socket(data, FIRSTSOCKET);
}
SSH_STRING_FREE_CHAR(sshc->homedir);