diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-09 06:14:30 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-09 06:14:30 +0000 |
commit | c199e3b0e21f73b47735d1a1ffadbc7b678c76bc (patch) | |
tree | 4f501a44df1b328176de6c855109c20ee36402e9 /cli.c | |
parent | bacddfcf518c946535e9c72a3259900c1fb488c8 (diff) |
use S_OR where appropriate, comment an unclear difference in format
between CONCISE and VERBOSE
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25860 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rw-r--r-- | cli.c | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -422,15 +422,21 @@ 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->appl ? c->appl : "(None)", + S_OR(c->data, ""), /* XXX different from verbose ? */ S_OR(c->cid.cid_num, ""), - c->accountcode ? c->accountcode : "", c->amaflags, - durbuf, bc ? bc->name : "(None)"); + S_OR(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)", - S_OR(c->cid.cid_num, ""), durbuf, - c->accountcode ? c->accountcode : "", bc ? bc->name : "(None)"); + c->appl ? c->appl : "(None)", + c->data ? S_OR(c->data, "(Empty)" ): "(None)", + S_OR(c->cid.cid_num, ""), + durbuf, + S_OR(c->accountcode, ""), + bc ? bc->name : "(None)"); } else { if (!ast_strlen_zero(c->context) && !ast_strlen_zero(c->exten)) snprintf(locbuf, sizeof(locbuf), "%s@%s:%d", c->exten, c->context, c->priority); |