mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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:
@@ -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(®istrations);
|
||||
ast_cli(fd, "%d IAX2 registrations.\n", counter);
|
||||
return RESULT_SUCCESS;
|
||||
#undef FORMAT
|
||||
#undef FORMAT2
|
||||
|
Reference in New Issue
Block a user