Skip to content

Commit

Permalink
save identity file when processing api events
Browse files Browse the repository at this point in the history
  • Loading branch information
scareything authored Dec 18, 2024
1 parent 884b9cd commit 34f059f
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 @@ -322,7 +322,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 @@ -948,7 +948,7 @@ static void on_ziti_event(ziti_context ztx, const ziti_event_t *event) {

case ZitiAPIEvent: {
if (event->event.api.new_ctrl_address || event->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 @@ -1337,7 +1337,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 34f059f

Please sign in to comment.