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
This commit is contained in:
Dwayne M. Hubbard
2007-08-16 18:23:39 +00:00
parent 46b75d5f17
commit 6186647ac3

View File

@@ -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