summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd.c b/cmd.c
index 192d0add..4ff05eb4 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1,4 +1,4 @@
-/* $Id: cmd.c,v 1.112 2009-08-09 17:48:55 tcunha Exp $ */
+/* $Id: cmd.c,v 1.113 2009-08-24 16:24:18 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -298,8 +298,8 @@ cmd_current_session(struct cmd_ctx *ctx)
u_int i;
int found;
- if (ctx->cursession != NULL)
- return (ctx->cursession);
+ if (ctx->curclient != NULL && ctx->curclient->session != NULL)
+ return (ctx->curclient->session);
/*
* If the name of the calling client's pty is know, build a list of the