Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bring back tlsuv 0.26 idiosyncrasies #585

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static void session_cb(ziti_net_session *session, const ziti_error *err, void *c
conn->server.session = session;
notify_status(conn, ZITI_OK);

free_ziti_net_session(old);
free_ziti_net_session_ptr(old);

process_bindings(conn);
break;
Expand Down
3 changes: 3 additions & 0 deletions library/ziti.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@
ziti_context ctx = NULL;
PREPF(ziti, ziti_errorstr);

if (options->config == NULL) {

Check warning on line 209 in library/ziti.c

View workflow job for this annotation

GitHub Actions / Linux ARM64

'config' is deprecated: ignored, will be removed [-Wdeprecated-declarations]

Check warning on line 209 in library/ziti.c

View workflow job for this annotation

GitHub Actions / Linux x86_64

'config' is deprecated: ignored, will be removed [-Wdeprecated-declarations]
ZITI_LOG(ERROR, "config or controller/tls has to be set");
return ZITI_INVALID_CONFIG;
}
ctx = calloc(1, sizeof(*ctx));

if (options->config != NULL) {

Check warning on line 215 in library/ziti.c

View workflow job for this annotation

GitHub Actions / Linux ARM64

'config' is deprecated: ignored, will be removed [-Wdeprecated-declarations]

Check warning on line 215 in library/ziti.c

View workflow job for this annotation

GitHub Actions / Linux x86_64

'config' is deprecated: ignored, will be removed [-Wdeprecated-declarations]
TRY(ziti, ziti_load_config(&ctx->config, options->config));

Check warning on line 216 in library/ziti.c

View workflow job for this annotation

GitHub Actions / Linux ARM64

'config' is deprecated: ignored, will be removed [-Wdeprecated-declarations]
}

if (ctx->config.id.ca && strncmp(ctx->config.id.ca, "file://", strlen("file://")) == 0) {
Expand Down Expand Up @@ -559,6 +559,7 @@
free_ziti_identity_data(ztx->identity_data);
FREE(ztx->identity_data);
FREE(ztx->last_update);
free_ziti_config(&ztx->config);

ziti_event_t ev = {0};
ev.type = ZitiContextEvent;
Expand Down Expand Up @@ -623,7 +624,7 @@
printer(ctx, "\n=================\nZiti Context:\n");
printer(ctx, "ID:\t%d\n", ztx->id);
printer(ctx, "Enabled:\t%s\n", ziti_is_enabled(ztx) ? "true" : "false");
printer(ctx, "Config:\t%s\n", ztx->opts.config);

Check warning on line 627 in library/ziti.c

View workflow job for this annotation

GitHub Actions / Linux ARM64

'config' is deprecated: ignored, will be removed [-Wdeprecated-declarations]
printer(ctx, "Controller:\t%s\n", ztx_controller(ztx));
printer(ctx, "Config types:\n");
for (int i = 0; ztx->opts.config_types && ztx->opts.config_types[i]; i++) {
Expand Down Expand Up @@ -1840,8 +1841,10 @@
} else {
#define copy_opt(f) if (options->f != 0) ztx->opts.f = options->f

copy_opt(disabled);
copy_opt(config_types);
copy_opt(refresh_interval);
copy_opt(metrics_type);
copy_opt(api_page_size);
copy_opt(event_cb);
copy_opt(events);
Expand Down
Loading