Explanation of -t.

This commit is contained in:
Nicholas Marriott
2008-06-16 22:03:27 +00:00
parent f9a1270d39
commit ff21dbd58b
3 changed files with 72 additions and 22 deletions

18
cmd.c
View File

@ -1,4 +1,4 @@
/* $Id: cmd.c,v 1.47 2008-06-16 07:01:41 nicm Exp $ */
/* $Id: cmd.c,v 1.48 2008-06-16 22:03:27 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -281,8 +281,12 @@ cmd_find_client(struct cmd_ctx *ctx, const char *arg)
if ((c = arg_parse_client(arg)) == NULL)
c = ctx->curclient;
if (c == NULL)
ctx->error(ctx, "client not found: %s", arg);
if (c == NULL) {
if (arg != NULL)
ctx->error(ctx, "client not found: %s", arg);
else
ctx->error(ctx, "no client found");
}
return (c);
}
@ -295,8 +299,12 @@ cmd_find_session(struct cmd_ctx *ctx, const char *arg)
s = ctx->cursession;
if (s == NULL)
s = cmd_current_session(ctx);
if (s == NULL)
ctx->error(ctx, "session not found: %s", arg);
if (s == NULL) {
if (arg != NULL)
ctx->error(ctx, "session not found: %s", arg);
else
ctx->error(ctx, "no session found");
}
return (s);
}