aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-21 10:00:58 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-21 10:00:58 +0000
commit723fba46b4ca3ad6001cb5b83ffe3898e5d5b86e (patch)
treeb670ed53ae8d6ad549dc318aeae78117b2215188
parent7eb73ddcb4415ab3cbd2239642476c68b9e1e0a1 (diff)
make NULL and "" equivalent for some cid fields.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21792 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--cli.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cli.c b/cli.c
index c61f5a5c8..591652d3e 100644
--- a/cli.c
+++ b/cli.c
@@ -446,13 +446,13 @@ static int handle_chanlist(int fd, int argc, char *argv[])
if (concise) {
ast_cli(fd, CONCISE_FORMAT_STRING, c->name, c->context, c->exten, c->priority, ast_state2str(c->_state),
c->appl ? c->appl : "(None)", c->data ? c->data : "",
- c->cid.cid_num ? c->cid.cid_num : "",
+ S_OR(c->cid.cid_num, ""),
c->accountcode ? c->accountcode : "", c->amaflags,
durbuf, bc ? bc->name : "(None)");
} else if (verbose) {
ast_cli(fd, VERBOSE_FORMAT_STRING, c->name, c->context, c->exten, c->priority, ast_state2str(c->_state),
c->appl ? c->appl : "(None)", c->data ? S_OR(c->data, "(Empty)" ): "(None)",
- c->cid.cid_num ? c->cid.cid_num : "", durbuf,
+ S_OR(c->cid.cid_num, ""), durbuf,
c->accountcode ? c->accountcode : "", bc ? bc->name : "(None)");
} else {
if (!ast_strlen_zero(c->context) && !ast_strlen_zero(c->exten))
@@ -750,9 +750,9 @@ static int handle_showchan(int fd, int argc, char *argv[])
" Data: %s\n"
" Blocking in: %s\n",
c->name, c->tech->type, c->uniqueid,
- (c->cid.cid_num ? c->cid.cid_num : "(N/A)"),
- (c->cid.cid_name ? c->cid.cid_name : "(N/A)"),
- (c->cid.cid_dnid ? c->cid.cid_dnid : "(N/A)" ), ast_state2str(c->_state), c->_state, c->rings,
+ S_OR(c->cid.cid_num, "(N/A)"),
+ S_OR(c->cid.cid_name, "(N/A)"),
+ S_OR(c->cid.cid_dnid, "(N/A)"), ast_state2str(c->_state), c->_state, c->rings,
ast_getformatname_multiple(nf, sizeof(nf), c->nativeformats),
ast_getformatname_multiple(wf, sizeof(wf), c->writeformat),
ast_getformatname_multiple(rf, sizeof(rf), c->readformat),