diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-04 09:22:45 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-04 09:22:45 +0000 |
commit | 0ab438ba50ac4a6a0d3c3794c399db28bc40af55 (patch) | |
tree | 0415ff91e309276e534fc94a6cdf8ed36fda8280 /channel.c | |
parent | 762e166239d313a081568fca41f02f5788fd65e2 (diff) |
Issue #6127: Count in show channeltypes (junky)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7776 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -168,8 +168,10 @@ const struct ast_cause { static int show_channeltypes(int fd, int argc, char *argv[]) { -#define FORMAT "%-10.10s %-30.30s %-12.12s %-12.12s %-12.12s\n" +#define FORMAT "%-10.10s %-40.40s %-12.12s %-12.12s %-12.12s\n" struct chanlist *cl; + int count_chan = 0; + ast_cli(fd, FORMAT, "Type", "Description", "Devicestate", "Indications", "Transfer"); ast_cli(fd, FORMAT, "----------", "-----------", "-----------", "-----------", "--------"); if (ast_mutex_lock(&chlock)) { @@ -181,8 +183,10 @@ static int show_channeltypes(int fd, int argc, char *argv[]) (cl->tech->devicestate) ? "yes" : "no", (cl->tech->indicate) ? "yes" : "no", (cl->tech->transfer) ? "yes" : "no"); + count_chan++; } ast_mutex_unlock(&chlock); + ast_cli(fd, "----------\n%d channel drivers registered.\n", count_chan); return RESULT_SUCCESS; #undef FORMAT |