diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-16 22:03:27 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-16 22:03:27 +0000 |
commit | ff21dbd58b8ca24ec47df0816b2245499a4a49b4 (patch) | |
tree | 7b598060a0669412e22c91c226abbab4d630b96b /cmd.c | |
parent | f9a1270d391bbd6637f03978b89cb4c392a3e1b6 (diff) | |
download | rtmux-ff21dbd58b8ca24ec47df0816b2245499a4a49b4.tar.gz rtmux-ff21dbd58b8ca24ec47df0816b2245499a4a49b4.tar.bz2 rtmux-ff21dbd58b8ca24ec47df0816b2245499a4a49b4.zip |
Explanation of -t.
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -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); } |