Both of cmdclient and curclient CAN be NULL - if the command is executed from

the configuration file. In this case, attach-session can't do much, and
new-session should just assume -d.
This commit is contained in:
Nicholas Marriott
2009-07-23 12:33:48 +00:00
parent 05b511f96a
commit 96a7cf1e6a
3 changed files with 21 additions and 8 deletions

View File

@ -55,6 +55,9 @@ cmd_attach_session_exec(struct cmd *self, struct cmd_ctx *ctx)
if ((s = cmd_find_session(ctx, data->target)) == NULL)
return (-1);
if (ctx->cmdclient == NULL && ctx->curclient == NULL)
return (0);
if (ctx->cmdclient == NULL) {
if (data->chflags & CMD_CHFLAG('d')) {
/*