update to the latest csdk

This commit is contained in:
dovholuknf
2020-12-04 20:57:05 -05:00
parent 9a3a87c6ca
commit 4f52f91fb4
2 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -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
+8 -5
View File
@@ -19,13 +19,18 @@
#include <ziti/ziti_tunnel.h>
#include <ziti/ziti_log.h>
#include <uv.h>
#include <stdio.h>
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);
}