8000 ssh: move easy handle/connection protocol structs to meta by icing · Pull Request #17273 · curl/curl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ssh: move easy handle/connection protocol structs to meta #17273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion lib/request.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ struct SingleRequest {
points to data it needs. */
union {
struct FILEPROTO *file;
struct SSHPROTO *ssh;
} p;
#ifndef CURL_DISABLE_COOKIES
unsigned char setcookies;
Expand Down
8 changes: 6 additions & 2 deletions
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,12 @@ CURLcode Curl_conn_upkeep(struct Curl_easy *data,
static bool ssh_config_matches(struct connectdata *one,
struct connectdata *two)
{
return Curl_safecmp(one->proto.sshc.rsa, two->proto.sshc.rsa) &&
Curl_safecmp(one->proto.sshc.rsa_pub, two->proto.sshc.rsa_pub);
struct ssh_conn *sshc1, *sshc2;

sshc1 = Curl_conn_meta_get(one, CURL_META_SSH_CONN);
sshc2 = Curl_conn_meta_get(two, CURL_META_SSH_CONN);
return (sshc1 && sshc2 && Curl_safecmp(sshc1->rsa, sshc2->rsa) &&
Curl_safecmp(sshc1->rsa_pub, sshc2->rsa_pub));
}
#endif

Expand Down
7 changes: 0 additions & 7 deletions lib/urldata.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,13 +862,6 @@ struct connectdata {
struct negotiatedata proxyneg; /* state data for proxy Negotiate auth */
#endif

union {
#ifdef USE_SSH
struct ssh_conn sshc;
#endif
unsigned int unused:1; /* avoids empty union */
} proto;

#ifdef USE_UNIX_SOCKETS
char *unix_domain_socket;
#endif
Expand Down
Loading
Loading
0