summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorDwayne M. Hubbard <dwayne.hubbard@gmail.com>2007-08-16 18:23:39 +0000
committerDwayne M. Hubbard <dwayne.hubbard@gmail.com>2007-08-16 18:23:39 +0000
commit6186647ac334b98320840eddc6b928a6c6d9c5a4 (patch)
treea0b0fda4932854916187fb382079c8464b329cb2 /channels
parent46b75d5f1790ce3bdeabce0e2f9ebe609da3b261 (diff)
added counter for iax2 show registry CLI output, closes issue 10461, thanks junky
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 70122bc3c..6f41fdb69 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -4652,6 +4652,7 @@ static int iax2_show_registry(int fd, int argc, char *argv[])
char host[80];
char perceived[80];
+ int counter = 0;
if (argc != 3)
return RESULT_SHOWUSAGE;
ast_cli(fd, FORMAT2, "Host", "dnsmgr", "Username", "Perceived", "Refresh", "State");
@@ -4665,8 +4666,10 @@ static int iax2_show_registry(int fd, int argc, char *argv[])
ast_cli(fd, FORMAT, host,
(reg->dnsmgr) ? "Y" : "N",
reg->username, perceived, reg->refresh, regstate2str(reg->regstate));
+ counter++;
}
AST_LIST_UNLOCK(&registrations);
+ ast_cli(fd, "%d IAX2 registrations.\n", counter);
return RESULT_SUCCESS;
#undef FORMAT
#undef FORMAT2