[asterisk-commits] trunk r15815 - in /trunk: include/asterisk/pbx.h
pbx.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Mar 28 15:09:39 MST 2006
Author: kpfleming
Date: Tue Mar 28 16:09:38 2006
New Revision: 15815
URL: http://svn.digium.com/view/asterisk?rev=15815&view=rev
Log:
make 'show hints' CLI command show context name for each hint
Modified:
trunk/include/asterisk/pbx.h
trunk/pbx.c
Modified: trunk/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/pbx.h?rev=15815&r1=15814&r2=15815&view=diff
==============================================================================
--- trunk/include/asterisk/pbx.h (original)
+++ trunk/include/asterisk/pbx.h Tue Mar 28 16:09:38 2006
@@ -723,6 +723,7 @@
/* Functions for returning values from structures */
const char *ast_get_context_name(struct ast_context *con);
const char *ast_get_extension_name(struct ast_exten *exten);
+struct ast_context *ast_get_extension_context(struct ast_exten *exten);
const char *ast_get_include_name(struct ast_include *include);
const char *ast_get_ignorepat_name(struct ast_ignorepat *ip);
const char *ast_get_switch_name(struct ast_sw *sw);
Modified: trunk/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx.c?rev=15815&r1=15814&r2=15815&view=diff
==============================================================================
--- trunk/pbx.c (original)
+++ trunk/pbx.c Tue Mar 28 16:09:38 2006
@@ -2974,8 +2974,10 @@
watchers = 0;
for (watcher = hint->callbacks; watcher; watcher = watcher->next)
watchers++;
- ast_cli(fd, " %-20.20s: %-20.20s State:%-15.15s Watchers %2d\n",
- ast_get_extension_name(hint->exten), ast_get_extension_app(hint->exten),
+ ast_cli(fd, " %-20.20s@%20s: %-20.20s State:%-15.15s Watchers %2d\n",
+ ast_get_extension_name(hint->exten),
+ ast_get_context_name(ast_get_extension_context(hint->exten)),
+ ast_get_extension_app(hint->exten),
ast_extension_state2str(hint->laststate), watchers);
num++;
}
@@ -5893,6 +5895,11 @@
return con ? con->name : NULL;
}
+struct ast_context *ast_get_extension_context(struct ast_exten *exten)
+{
+ return exten ? exten->parent : NULL;
+}
+
const char *ast_get_extension_name(struct ast_exten *exten)
{
return exten ? exten->exten : NULL;
More information about the asterisk-commits
mailing list