[svn-commits] sgriepentrog: trunk r415715 - /trunk/main/pbx.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Jun 11 15:22:30 CDT 2014
Author: sgriepentrog
Date: Wed Jun 11 15:22:23 2014
New Revision: 415715
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=415715
Log:
CLI: correct presence information on core show hints
Adds presence to core show hint and changes presence
string conversion to use the correct function.
ASTERISK-23858 #close
Review: https://reviewboard.asterisk.org/r/3611/
Modified:
trunk/main/pbx.c
Modified: trunk/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/pbx.c?view=diff&rev=415715&r1=415714&r2=415715
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Wed Jun 11 15:22:23 2014
@@ -7404,7 +7404,7 @@
buf,
ast_get_extension_app(hint->exten),
ast_extension_state2str(hint->laststate),
- ast_extension_state2str(hint->last_presence_state),
+ ast_presence_state2str(hint->last_presence_state),
watchers);
ao2_unlock(hint);
@@ -7460,6 +7460,7 @@
int watchers;
int num = 0, extenlen;
struct ao2_iterator i;
+ char buf[AST_MAX_EXTENSION+AST_MAX_CONTEXT+2];
switch (cmd) {
case CLI_INIT:
@@ -7491,11 +7492,15 @@
}
if (!strncasecmp(ast_get_extension_name(hint->exten), a->argv[3], extenlen)) {
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_presence_state2str(hint->last_presence_state),
+ watchers);
num++;
}
ao2_unlock(hint);
More information about the svn-commits
mailing list