From 4f52f91fb4fb227832d59a4ab487ff2976a86155 Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Fri, 4 Dec 2020 20:57:05 -0500 Subject: [PATCH] update to the latest csdk --- service/build.bat | 2 +- service/cziti/sdk.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/service/build.bat b/service/build.bat index 8ab65389..ebc871f9 100644 --- a/service/build.bat +++ b/service/build.bat @@ -14,7 +14,7 @@ REM See the License for the specific language governing permissions and REM limitations under the License. REM SET REPO_URL=https://github.com/openziti/ziti-tunnel-sdk-c.git -SET ZITI_TUNNEL_REPO_BRANCH=v0.7.21 +SET ZITI_TUNNEL_REPO_BRANCH=v0.7.22 REM override the c sdk used in the build - leave blank for the same as specified in the tunneler sdk SET ZITI_SDK_C_BRANCH= REM the number of TCP connections the tunneler sdk can have at any one time diff --git a/service/cziti/sdk.c b/service/cziti/sdk.c index 247cce08..e79a2e37 100644 --- a/service/cziti/sdk.c +++ b/service/cziti/sdk.c @@ -19,13 +19,18 @@ #include #include #include +#include void libuv_stopper(uv_async_t *a) { uv_stop(a->loop); } void set_log_level(int level, libuv_ctx *lctx) { - ziti_debug_level = level; - ziti_set_log(log_writer_shim_go, lctx->l); + //ZITI_LOG(ERROR, "SETTING LOG TO %d", level); + ziti_log_set_level(level); + //init_debug(&lctx->l); + //ZITI_LOG(INFO, "THIS IS INFO"); + //ZITI_LOG(DEBUG, "THIS IS DEBUG"); + //ZITI_LOG(TRACE, "THIS IS TRACE"); } void log_writer_shim_go(int level, const char *loc, const char *msg, size_t msglen) { @@ -34,9 +39,7 @@ void log_writer_shim_go(int level, const char *loc, const char *msg, size_t msgl void libuv_init(libuv_ctx *lctx) { lctx->l = uv_default_loop(); - ziti_set_log(log_writer_shim_go, lctx->l); - init_debug(lctx->l); - + ziti_log_init(lctx->l, 6 /*default to 6*/, log_writer_shim_go); uv_async_init(lctx->l, &lctx->stopper, libuv_stopper); }