[asterisk-commits] jpeeler: branch jpeeler/sip-dnsmgr r112358 - /team/jpeeler/sip-dnsmgr/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Apr 1 17:46:04 CDT 2008
Author: jpeeler
Date: Tue Apr 1 17:46:04 2008
New Revision: 112358
URL: http://svn.digium.com/view/asterisk?view=rev&rev=112358
Log:
add dnsmgr status in sip show registry output
Modified:
team/jpeeler/sip-dnsmgr/channels/chan_sip.c
Modified: team/jpeeler/sip-dnsmgr/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/sip-dnsmgr/channels/chan_sip.c?view=diff&rev=112358&r1=112357&r2=112358
==============================================================================
--- team/jpeeler/sip-dnsmgr/channels/chan_sip.c (original)
+++ team/jpeeler/sip-dnsmgr/channels/chan_sip.c Tue Apr 1 17:46:04 2008
@@ -12872,8 +12872,8 @@
/*! \brief Show SIP Registry (registrations with other SIP proxies */
static char *sip_show_registry(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
-#define FORMAT2 "%-30.30s %-12.12s %8.8s %-20.20s %-25.25s\n"
-#define FORMAT "%-30.30s %-12.12s %8d %-20.20s %-25.25s\n"
+#define FORMAT2 "%-30.30s %-6.6s %-12.12s %8.8s %-20.20s %-25.25s\n"
+#define FORMAT "%-30.30s %-6.6s %-12.12s %8d %-20.20s %-25.25s\n"
char host[80];
char tmpdat[256];
struct ast_tm tm;
@@ -12892,7 +12892,7 @@
if (a->argc != 3)
return CLI_SHOWUSAGE;
- ast_cli(a->fd, FORMAT2, "Host", "Username", "Refresh", "State", "Reg.Time");
+ ast_cli(a->fd, FORMAT2, "Host", "dnsmgr", "Username", "Refresh", "State", "Reg.Time");
ASTOBJ_CONTAINER_TRAVERSE(®l, 1, do {
ASTOBJ_RDLOCK(iterator);
snprintf(host, sizeof(host), "%s:%d", iterator->hostname, iterator->portno ? iterator->portno : STANDARD_SIP_PORT);
@@ -12901,7 +12901,7 @@
ast_strftime(tmpdat, sizeof(tmpdat), "%a, %d %b %Y %T", &tm);
} else
tmpdat[0] = '\0';
- ast_cli(a->fd, FORMAT, host, iterator->username, iterator->refresh, regstate2str(iterator->regstate), tmpdat);
+ ast_cli(a->fd, FORMAT, host, (iterator->dnsmgr) ? "Y" : "N", iterator->username, iterator->refresh, regstate2str(iterator->regstate), tmpdat);
ASTOBJ_UNLOCK(iterator);
counter++;
} while(0));
More information about the asterisk-commits
mailing list