From 0987b1a691f83fda38f17da98116311fda1ed29f Mon Sep 17 00:00:00 2001 From: Shawn Carey Date: Tue, 5 Dec 2023 13:10:05 -0500 Subject: [PATCH 1/3] rollback tlsuv update for now --- deps/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index f312064f..4f4a6454 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -8,7 +8,7 @@ else () FetchContent_Declare(tlsuv GIT_REPOSITORY https://github.com/openziti/tlsuv.git - GIT_TAG v0.27.2 + GIT_TAG v0.26.1 ) FetchContent_MakeAvailable(tlsuv) From 6164020af3566aa4e053c4bdce47734347515ce4 Mon Sep 17 00:00:00 2001 From: Shawn Carey Date: Tue, 5 Dec 2023 13:52:44 -0500 Subject: [PATCH 2/3] use newest vcpkg baseline with older libuv namespacing --- vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index 1640392e..e4f00eac 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -28,5 +28,5 @@ ] } }, - "builtin-baseline": "8eb57355a4ffb410a2e94c07b4dca2dffbee8e50" + "builtin-baseline": "f6a5d4e8eb7476b8d7fc12a56dff300c1c986131" } From 47fc8b6b2becab69c429397d90be74185306f9b1 Mon Sep 17 00:00:00 2001 From: Shawn Carey Date: Tue, 5 Dec 2023 14:14:27 -0500 Subject: [PATCH 3/3] conform to tlsuv 0.26.1 api --- library/ziti_ctrl.c | 6 +++--- programs/sample_http_link/sample_http_link.c | 2 +- tests/ziti_src_tests.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/ziti_ctrl.c b/library/ziti_ctrl.c index ea40e5e0..b591f09e 100644 --- a/library/ziti_ctrl.c +++ b/library/ziti_ctrl.c @@ -132,7 +132,7 @@ static void ctrl_paging_req(struct ctrl_resp *resp); static void ctrl_default_cb(void *s, const ziti_error *e, struct ctrl_resp *resp); -static void ctrl_body_cb(tlsuv_http_req_t *req, char *b, ssize_t len); +static void ctrl_body_cb(tlsuv_http_req_t *req, const char *b, ssize_t len); static tlsuv_http_req_t * start_request(tlsuv_http_t *http, const char *method, const char *path, tlsuv_http_resp_cb cb, struct ctrl_resp *resp) { @@ -285,11 +285,11 @@ static void ctrl_service_cb(ziti_service **services, ziti_error *e, struct ctrl_ free(services); } -static void free_body_cb(tlsuv_http_req_t *req, char *body, ssize_t len) { +static void free_body_cb(tlsuv_http_req_t *req, const char *body, ssize_t len) { free((char *) body); } -static void ctrl_body_cb(tlsuv_http_req_t *req, char *b, ssize_t len) { +static void ctrl_body_cb(tlsuv_http_req_t *req, const char *b, ssize_t len) { struct ctrl_resp *resp = req->data; ziti_controller *ctrl = resp->ctrl; diff --git a/programs/sample_http_link/sample_http_link.c b/programs/sample_http_link/sample_http_link.c index 77780345..0477a463 100644 --- a/programs/sample_http_link/sample_http_link.c +++ b/programs/sample_http_link/sample_http_link.c @@ -45,7 +45,7 @@ void resp_cb(tlsuv_http_resp_t *resp, void *data) { printf("\n"); } -void body_cb(tlsuv_http_req_t *req, char *body, ssize_t len) { +void body_cb(tlsuv_http_req_t *req, const char *body, ssize_t len) { if (len == UV_EOF) { printf("\n\n====================\nRequest completed\n"); ziti_shutdown(ziti); diff --git a/tests/ziti_src_tests.cpp b/tests/ziti_src_tests.cpp index 544befe2..a9b83e8c 100644 --- a/tests/ziti_src_tests.cpp +++ b/tests/ziti_src_tests.cpp @@ -60,7 +60,7 @@ TEST_CASE("httpbin.ziti:ziti_src", "[integ]") { auto t = (source_test*)ctx; t->code = resp->code; - resp->body_cb = [](tlsuv_http_req_t *req, char *body, ssize_t len){ + resp->body_cb = [](tlsuv_http_req_t *req, const char *body, ssize_t len){ auto t = (source_test*)req->data; if (len > 0) t->body.append(body, len);