mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:13:38 +03:00
changing the first handler->getsock method
This commit is contained in:
parent
cab43414f9
commit
1dffb13e93
24 changed files with 181 additions and 73 deletions
|
|
@ -69,6 +69,8 @@ static CURLcode wsftp_disconnect(struct Curl_easy *data,
|
|||
static unsigned int wssh_getsock(struct Curl_easy *data,
|
||||
struct connectdata *conn,
|
||||
curl_socket_t *sock);
|
||||
static CURLcode wssh_pollset(struct Curl_easy *data,
|
||||
struct easy_pollset *ps);
|
||||
static CURLcode wssh_setup_connection(struct Curl_easy *data,
|
||||
struct connectdata *conn);
|
||||
static void wssh_sshc_cleanup(struct ssh_conn *sshc);
|
||||
|
|
@ -87,7 +89,7 @@ const struct Curl_handler Curl_handler_scp = {
|
|||
wssh_connect, /* connect_it */
|
||||
wssh_multi_statemach, /* connecting */
|
||||
wscp_doing, /* doing */
|
||||
wssh_getsock, /* proto_getsock */
|
||||
wssh_pollset, /* proto_pollset */
|
||||
wssh_getsock, /* doing_getsock */
|
||||
ZERO_NULL, /* domore_getsock */
|
||||
wssh_getsock, /* perform_getsock */
|
||||
|
|
@ -118,7 +120,7 @@ const struct Curl_handler Curl_handler_sftp = {
|
|||
wssh_connect, /* connect_it */
|
||||
wssh_multi_statemach, /* connecting */
|
||||
wsftp_doing, /* doing */
|
||||
wssh_getsock, /* proto_getsock */
|
||||
wssh_pollset, /* proto_pollset */
|
||||
wssh_getsock, /* doing_getsock */
|
||||
ZERO_NULL, /* domore_getsock */
|
||||
wssh_getsock, /* perform_getsock */
|
||||
|
|
@ -1202,6 +1204,19 @@ static unsigned int wssh_getsock(struct Curl_easy *data,
|
|||
return bitmap;
|
||||
}
|
||||
|
||||
static CURLcode wssh_pollset(struct Curl_easy *data,
|
||||
struct easy_pollset *ps)
|
||||
{
|
||||
int flags = 0;
|
||||
if(data->conn->waitfor & KEEP_RECV)
|
||||
flags |= CURL_POLL_IN;
|
||||
if(data->conn->waitfor & KEEP_SEND)
|
||||
flags |= CURL_POLL_OUT;
|
||||
return flags ?
|
||||
Curl_pollset_change(data, ps, data->conn->sock[FIRSTSOCKET], flags, 0) :
|
||||
CURLE_OK;
|
||||
}
|
||||
|
||||
void Curl_ssh_version(char *buffer, size_t buflen)
|
||||
{
|
||||
(void)msnprintf(buffer, buflen, "wolfssh/%s", LIBWOLFSSH_VERSION_STRING);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue