Skip to content

Commit

Permalink
Merge pull request #1052 from openziti/fix-newAddress-event
Browse files Browse the repository at this point in the history
fix newAddress event writing identity file
  • Loading branch information
dovholuknf authored Dec 2, 2024
2 parents 224cb88 + d55ae0e commit 5ee5dc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/ziti-tunnel-cbs/include/ziti/ziti_tunnel_cbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ struct add_identity_request_s {

struct ziti_instance_s {
char *identifier;
char *config_path;
command_cb load_cb;
void *load_ctx;

Expand Down
4 changes: 2 additions & 2 deletions lib/ziti-tunnel-cbs/ziti_tunnel_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ static void on_ziti_event(ziti_context ztx, const ziti_event_t *event) {

case ZitiAPIEvent: {
if (event->api.new_ctrl_address || event->api.new_ca_bundle) {
if (instance->config_path) {
if (instance->identifier) {
api_update_req *req = calloc(1, sizeof(api_update_req));
req->wr.data = req;
req->ztx = ztx;
Expand Down Expand Up @@ -1505,7 +1505,7 @@ goto DONE; \
static void update_config(uv_work_t *wr) {
api_update_req *req = wr->data;
struct ziti_instance_s *inst = ziti_app_ctx(req->ztx);
const char *config_file = inst->config_path;
const char *config_file = inst->identifier;
size_t cfg_len;
char *cfg_buf = NULL;
uv_file f;
Expand Down

0 comments on commit 5ee5dc7

Please sign in to comment.