[asterisk-commits] sgriepentrog: trunk r415698 - /trunk/main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jun 10 17:31:10 CDT 2014
Author: sgriepentrog
Date: Tue Jun 10 17:31:04 2014
New Revision: 415698
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=415698
Log:
CLI: add presence information to core show hints
Adds presence state value to output of core show
hints. Also reformats the output slightly so it
doesn't use as much space as it would otherwise.
Was:
1000 at demo : SIP/1000 State:Unavailable Watchers 0
Now:
1000 at demo : SIP/1000 State:Unavailable Presence:Idle Watchers 0
AFS-53 #close
Review: https://reviewboard.asterisk.org/r/3604/
Modified:
trunk/main/pbx.c
Modified: trunk/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/pbx.c?view=diff&rev=415698&r1=415697&r2=415698
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Tue Jun 10 17:31:04 2014
@@ -7367,6 +7367,7 @@
int num = 0;
int watchers;
struct ao2_iterator i;
+ char buf[AST_MAX_EXTENSION+AST_MAX_CONTEXT+2];
switch (cmd) {
case CLI_INIT:
@@ -7395,11 +7396,17 @@
continue;
}
watchers = ao2_container_count(hint->callbacks);
- ast_cli(a->fd, " %20s@%-20.20s: %-20.20s State:%-15.15s Watchers %2d\n",
+ sprintf(buf, "%s@%s",
ast_get_extension_name(hint->exten),
- ast_get_context_name(ast_get_extension_context(hint->exten)),
+ ast_get_context_name(ast_get_extension_context(hint->exten)));
+
+ ast_cli(a->fd, "%-20.20s: %-20.20s State:%-15.15s Presence:%-15.15s Watchers %2d\n",
+ buf,
ast_get_extension_app(hint->exten),
- ast_extension_state2str(hint->laststate), watchers);
+ ast_extension_state2str(hint->laststate),
+ ast_extension_state2str(hint->last_presence_state),
+ watchers);
+
ao2_unlock(hint);
num++;
}
More information about the asterisk-commits
mailing list