[Asterisk-cvs] asterisk pbx.c,1.154.2.4,1.154.2.5

russell at lists.digium.com russell at lists.digium.com
Thu Dec 30 16:03:02 CST 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv28500

Modified Files:
      Tag: v1-0
	pbx.c 
Log Message:
fix show dialplan for hints (bug #3074)


Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.154.2.4
retrieving revision 1.154.2.5
diff -u -d -r1.154.2.4 -r1.154.2.5
--- pbx.c	12 Nov 2004 15:27:30 -0000	1.154.2.4
+++ pbx.c	30 Dec 2004 20:57:41 -0000	1.154.2.5
@@ -2761,6 +2761,7 @@
 				e = ast_walk_context_extensions(c, NULL);
 				while (e) {
 					struct ast_exten *p;
+					int prio;
 
 					/* looking for extension? is this our extension? */
 					if (exten &&
@@ -2787,11 +2788,18 @@
 					snprintf(buf, sizeof(buf), "'%s' =>",
 						ast_get_extension_name(e));
 
-					snprintf(buf2, sizeof(buf2),
-						"%d. %s(%s)",
-						ast_get_extension_priority(e),
-						ast_get_extension_app(e),
-						(char *)ast_get_extension_app_data(e));
+					prio = ast_get_extension_priority(e);
+					if (prio == PRIORITY_HINT) {
+						snprintf(buf2, sizeof(buf2),
+							"hint: %s",
+							ast_get_extension_app(e));
+					} else {
+						snprintf(buf2, sizeof(buf2),
+							"%d. %s(%s)",
+							prio,
+							ast_get_extension_app(e),
+							(char *)ast_get_extension_app_data(e));
+					}
 
 					ast_cli(fd, "  %-17s %-45s [%s]\n", buf, buf2,
 						ast_get_extension_registrar(e));
@@ -2801,11 +2809,18 @@
 					while (p) {
 						bzero((void *)buf2, sizeof(buf2));
 
-						snprintf(buf2, sizeof(buf2),
-							"%d. %s(%s)",
-							ast_get_extension_priority(p),
-							ast_get_extension_app(p),
-							(char *)ast_get_extension_app_data(p));
+						prio = ast_get_extension_priority(p);
+						if (prio == PRIORITY_HINT) {
+							snprintf(buf2, sizeof(buf2),
+								"hint: %s",
+								ast_get_extension_app(p));
+						} else {
+							snprintf(buf2, sizeof(buf2),
+								"%d. %s(%s)",
+								prio,
+								ast_get_extension_app(p),
+								(char *)ast_get_extension_app_data(p));
+						}
 
 						ast_cli(fd,"  %-17s %-45s [%s]\n",
 							"", buf2,




More information about the svn-commits mailing list