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.
This commit is contained in:
Tiago Cunha
2009-07-23 13:25:27 +00:00
parent a551ff2b1b
commit f2451c1e29
3 changed files with 24 additions and 11 deletions

5
tmux.h
View File

@@ -1,4 +1,4 @@
/* $Id: tmux.h,v 1.386 2009-07-23 13:10:38 tcunha Exp $ */
/* $Id: tmux.h,v 1.387 2009-07-23 13:25:27 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -861,7 +861,8 @@ struct cmd_ctx {
* cmdclient is the client which sent the MSG_COMMAND to the server, if
* any. This is NULL unless the command came from the command-line.
*
* One of curclient or cmdclient is always NULL and the other not.
* cmdclient and curclient may both be NULL if the command is in the
* configuration file.
*/
struct client *curclient;
struct session *cursession;