version 1.4, 2009/07/10 05:50:54 |
version 1.5, 2009/07/13 23:11:35 |
|
|
const struct cmd_entry cmd_set_option_entry = { |
const struct cmd_entry cmd_set_option_entry = { |
"set-option", "set", |
"set-option", "set", |
CMD_OPTION_SESSION_USAGE, |
CMD_OPTION_SESSION_USAGE, |
CMD_GFLAG|CMD_UFLAG, |
0, CMD_CHFLAG('g')|CMD_CHFLAG('u'), |
NULL, |
NULL, |
cmd_option_parse, |
cmd_option_parse, |
cmd_set_option_exec, |
cmd_set_option_exec, |
|
|
const struct set_option_entry *entry; |
const struct set_option_entry *entry; |
u_int i; |
u_int i; |
|
|
if (data->flags & CMD_GFLAG) |
if (data->chflags & CMD_CHFLAG('g')) |
oo = &global_s_options; |
oo = &global_s_options; |
else { |
else { |
if ((s = cmd_find_session(ctx, data->target)) == NULL) |
if ((s = cmd_find_session(ctx, data->target)) == NULL) |
|
|
return (-1); |
return (-1); |
} |
} |
|
|
if (data->flags & CMD_UFLAG) { |
if (data->chflags & CMD_CHFLAG('u')) { |
if (data->flags & CMD_GFLAG) { |
if (data->chflags & CMD_CHFLAG('g')) { |
ctx->error(ctx, |
ctx->error(ctx, |
"can't unset global option: %s", entry->name); |
"can't unset global option: %s", entry->name); |
return (-1); |
return (-1); |