Skip to content

Commit 6490040

Browse files
authored
* fix warnings (errors on win32) * update [email protected]
1 parent 9c2d257 commit 6490040

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.21)
22

33

44
set(ZITI_SDK_DIR "" CACHE FILEPATH "developer option: use local ziti-sdk-c checkout")
5-
set(ZITI_SDK_VERSION "1.8.3" CACHE STRING "ziti-sdk-c version or branch to use")
5+
set(ZITI_SDK_VERSION "1.8.5" CACHE STRING "ziti-sdk-c version or branch to use")
66

77
# if TUNNEL_SDK_ONLY then don't descend into programs/ziti-edge-tunnel
88
option(TUNNEL_SDK_ONLY "build only ziti-tunnel-sdk (without ziti)" OFF)

lib/ziti-tunnel-cbs/ziti_hosting.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ static bool ziti_address_translate(ziti_address *dst_ip_inout, const ziti_addres
390390
}
391391
return true;
392392
}
393-
static ziti_address_translation *find_translation(const ziti_address *ip, const ziti_address_translation_array zats) {
393+
static ziti_address_translation *find_translation(const ziti_address *ip, ziti_address_translation_array zats) {
394394
char ip_str[64], from_str[64];
395395
ziti_address_print(ip_str, sizeof(ip_str), ip);
396396
for (int i = 0; zats != NULL && zats[i] != NULL; i++) {
@@ -577,7 +577,7 @@ static hosted_io_context hosted_io_context_new(struct hosted_service_ctx_s *serv
577577
io->computed_dst_ip_or_hn = dst_ip_or_hn;
578578
io->computed_dst_port = dst_port;
579579

580-
int socktype, uv_err = -1;
580+
int socktype, uv_err;
581581
int protocol_number = get_protocol_id(dst_protocol);
582582
switch (protocol_number) {
583583
case IPPROTO_TCP:

programs/ziti-edge-tunnel/config-utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static int update_file(const char *path, char *content, size_t content_len) {
6565
snprintf(backup, sizeof(backup), "%s.bak", path);
6666
CHECK_UV("create backup", uv_fs_rename(NULL, &fs_req, path, backup, NULL));
6767

68-
uv_os_fd_t f;
68+
uv_file f;
6969
CHECK_UV("open new config", f = uv_fs_open(NULL, &fs_req, path, UV_FS_O_WRONLY | UV_FS_O_CREAT, (int) mode, NULL));
7070
uv_buf_t buf = uv_buf_init(content, content_len);
7171
CHECK_UV("write new config", uv_fs_write(NULL, &fs_req, f, &buf, 1, 0, NULL));

programs/ziti-edge-tunnel/windows-scripts.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static bool is_buffer_available(size_t buf_len, size_t max_size, char* script) {
4545
return true;
4646
}
4747

48-
static bool exec_process(uv_loop_t *ziti_loop, const char* program, const char* args[]) {
48+
static bool exec_process(uv_loop_t *ziti_loop, const char* program, char* args[]) {
4949
uv_process_t* process = calloc(1, sizeof(uv_process_t));
5050
uv_process_options_t options = {0};
5151
uv_stdio_container_t stdio[3];
@@ -169,7 +169,7 @@ void chunked_add_nrpt_rules(uv_loop_t *ziti_loop, hostname_list_t *hostnames, co
169169

170170
ZITI_LOG(DEBUG, "Executing Add domains NRPT script :");
171171
ZITI_LOG(DEBUG, "%s", cmd);
172-
const char* args[] = {"powershell", "-Command", script, NULL};
172+
char* args[] = {"powershell", "-Command", script, NULL};
173173
bool result = exec_process(ziti_loop, args[0], args);
174174
if (!result) {
175175
ZITI_LOG(WARN, "Add domains NRPT script: %d(err=%lu)", result, GetLastError());
@@ -260,7 +260,7 @@ void chunked_remove_nrpt_rules(uv_loop_t *ziti_loop, hostname_list_t *hostnames)
260260

261261
ZITI_LOG(DEBUG, "Executing Remove domains NRPT script: ");
262262
ZITI_LOG(DEBUG, "%s", cmd);
263-
const char* args[] = {"powershell", "-Command", script, NULL};
263+
char* args[] = {"powershell", "-Command", script, NULL};
264264
bool result = exec_process(ziti_loop, args[0], args);
265265
if (!result) {
266266
ZITI_LOG(WARN, "Remove domains NRPT script: %d(err=%lu)", result, GetLastError());
@@ -403,7 +403,7 @@ void chunked_remove_and_add_nrpt_rules(uv_loop_t *ziti_loop, hostname_list_t *ho
403403

404404
ZITI_LOG(DEBUG, "Executing Remove and add domains NRPT script: ");
405405
ZITI_LOG(DEBUG, "%s", cmd);
406-
const char* args[] = {"powershell", "-Command", script, NULL};
406+
char* args[] = {"powershell", "-Command", script, NULL};
407407
bool result = exec_process(ziti_loop, args[0], args);
408408
if (!result) {
409409
ZITI_LOG(WARN, "Remove and add domains NRPT script: %d(err=%lu)", result, GetLastError());
@@ -512,7 +512,7 @@ void update_interface_metric(uv_loop_t *ziti_loop, const char *tun_name, int met
512512

513513
ZITI_LOG(DEBUG, "Executing Update Interface metric script :");
514514
ZITI_LOG(DEBUG, "%s", cmd);
515-
const char* args[] = {"powershell", "-Command", script, NULL};
515+
char* args[] = {"powershell", "-Command", script, NULL};
516516
bool result = exec_process(ziti_loop, args[0], args);
517517
if (!result) {
518518
ZITI_LOG(WARN, "Update Interface metric script: %d(err=%lu)", result, GetLastError());

0 commit comments

Comments
 (0)