]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hyper: fix CONNECT to set 'data' as userdata
authorDaniel Stenberg <daniel@haxx.se>
Sat, 30 Jan 2021 16:51:00 +0000 (17:51 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 30 Jan 2021 16:51:47 +0000 (17:51 +0100)
Follow-up to 14e075d1a7fd

lib/c-hyper.c
lib/http_proxy.c

index cdb8e0ef35f66b6af0163749b2ea3b13fa9cca1c..10bd7ef9bf193776666f4311398d032aac92d53a 100644 (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);
index 46261184d2b78fbd89d395b69cab3f4a71086440..a03a27fdc4e89f86a24a68879fc3039cf86eb369 100644 (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;