Skip to content

Commit

Permalink
Merge pull request #1021 from openziti/load-disabled-identity
Browse files Browse the repository at this point in the history
expose loading identity in `disabled` state
  • Loading branch information
ekoby authored Oct 16, 2024
2 parents 16206d8 + fea6344 commit 746b340
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 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 @@ -91,7 +91,8 @@ XX(code, model_number, none, Code, __VA_ARGS__)
#define TNL_LOAD_IDENTITY(XX, ...) \
XX(identifier, model_string, none, Identifier, __VA_ARGS__)\
XX(path, model_string, none, Path, __VA_ARGS__) \
XX(config, ziti_config, ptr, Config, __VA_ARGS__) \
XX(config, ziti_config, ptr, Config, __VA_ARGS__) \
XX(disabled, model_bool, none, Disabled, __VA_ARGS__) \
XX(apiPageSize, model_number, none, ApiPageSize, __VA_ARGS__)

#define TNL_ON_OFF_IDENTITY(XX, ...) \
Expand Down
2 changes: 1 addition & 1 deletion lib/ziti-tunnel-cbs/ziti_tunnel_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static int process_cmd(const tunnel_command *cmd, command_cb cb, void *ctx) {
result.error = "identifier is required when loading with config";
break;
}
rc = load_identity_cfg(load.identifier, load.config, false, (int)load.apiPageSize, cb, ctx);
rc = load_identity_cfg(load.identifier, load.config, load.disabled, (int)load.apiPageSize, cb, ctx);
} else if (load.path != NULL) {
const char *id = load.identifier ? load.identifier : load.path;
rc = load_identity(id, load.path, false, (int)load.apiPageSize, cb, ctx);
Expand Down

0 comments on commit 746b340

Please sign in to comment.