diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-07-23 13:25:27 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-07-23 13:25:27 +0000 |
commit | f2451c1e29d60b505855d7b0ca2077e2ae3e1dc8 (patch) | |
tree | 3331be6d3450187f2e7bfd7b51447073d6b9e614 /cmd-attach-session.c | |
parent | a551ff2b1befc91e17bc73b478da52342a56815e (diff) | |
download | rtmux-f2451c1e29d60b505855d7b0ca2077e2ae3e1dc8.tar.gz rtmux-f2451c1e29d60b505855d7b0ca2077e2ae3e1dc8.tar.bz2 rtmux-f2451c1e29d60b505855d7b0ca2077e2ae3e1dc8.zip |
Sync OpenBSD patchset 168:
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.
Diffstat (limited to 'cmd-attach-session.c')
-rw-r--r-- | cmd-attach-session.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd-attach-session.c b/cmd-attach-session.c index 1a0ee68d..410c7062 100644 --- a/cmd-attach-session.c +++ b/cmd-attach-session.c @@ -1,4 +1,4 @@ -/* $Id: cmd-attach-session.c,v 1.28 2009-07-18 11:06:09 nicm Exp $ */ +/* $Id: cmd-attach-session.c,v 1.29 2009-07-23 13:25:27 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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')) { /* |