mirror of
https://github.com/curl/curl.git
synced 2026-08-26 08:13:32 +03:00
urldata: remove 'void *protop' and create the union 'p'
... to avoid the use of 'void *' for the protocol specific structs done per transfer. Closes #6238
This commit is contained in:
parent
5c8849cede
commit
a95a6ce6b8
22 changed files with 183 additions and 168 deletions
|
|
@ -102,9 +102,9 @@ CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex)
|
|||
* This function might be called several times in the multi interface case
|
||||
* if the proxy's CONNECT response is not instant.
|
||||
*/
|
||||
prot_save = conn->data->req.protop;
|
||||
prot_save = conn->data->req.p.http;
|
||||
memset(&http_proxy, 0, sizeof(http_proxy));
|
||||
conn->data->req.protop = &http_proxy;
|
||||
conn->data->req.p.http = &http_proxy;
|
||||
connkeep(conn, "HTTP proxy CONNECT");
|
||||
|
||||
/* for the secondary socket (FTP), use the "connect to host"
|
||||
|
|
@ -125,7 +125,7 @@ CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex)
|
|||
else
|
||||
remote_port = conn->remote_port;
|
||||
result = Curl_proxyCONNECT(conn, sockindex, hostname, remote_port);
|
||||
conn->data->req.protop = prot_save;
|
||||
conn->data->req.p.http = prot_save;
|
||||
if(CURLE_OK != result)
|
||||
return result;
|
||||
Curl_safefree(data->state.aptr.proxyuserpwd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue