1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

hyper: fix CONNECT to set 'data' as userdata

Follow-up to 14e075d1a7
This commit is contained in:
Daniel Stenberg 2021-01-30 17:51:00 +01:00
parent 4fc5e7eda5
commit 3c2210713e
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ size_t Curl_hyper_recv(void *userp, hyper_context *ctx,
struct connectdata *conn = data->conn;
CURLcode result;
ssize_t nread;
DEBUGASSERT(conn);
(void)ctx;
result = Curl_read(data, conn->sockfd, (char *)buf, buflen, &nread);

View File

@ -681,7 +681,7 @@ static CURLcode CONNECT(struct Curl_easy *data,
goto error;
}
/* tell Hyper how to read/write network data */
hyper_io_set_userdata(io, conn);
hyper_io_set_userdata(io, data);
hyper_io_set_read(io, Curl_hyper_recv);
hyper_io_set_write(io, Curl_hyper_send);
conn->sockfd = tunnelsocket;