[asterisk-commits] murf: trunk r89271 - /trunk/main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 14 09:43:30 CST 2007
Author: murf
Date: Wed Nov 14 09:43:30 2007
New Revision: 89271
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89271
Log:
A further problem highlighted by 11233 has been resolved; a certain combination of patterns in a certain order, led to a malformed trie, due to a ptr not being initialized in the loop. Also, some tree printing prettifications.
Modified:
trunk/main/pbx.c
Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=89271&r1=89270&r2=89271
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Wed Nov 14 09:43:30 2007
@@ -855,7 +855,7 @@
ast_log(LOG_DEBUG,"%s%s:%c:%d:%s\n", prefix, node->x, node->is_pattern ? 'Y':'N', node->specificity, node->exten? "EXTEN":"");
strcpy(my_prefix,prefix);
- strcat(my_prefix,"+-----------------");
+ strcat(my_prefix,"+ ");
if (node->next_char)
print_match_char_tree(node->next_char, my_prefix);
if (node->alt_char)
@@ -867,9 +867,9 @@
{
char my_prefix[1024];
- ast_cli(fd, "%s%s:%c:%d:%s\n", prefix, node->x, node->is_pattern ? 'Y':'N', node->specificity, node->exten? "EXTEN":"");
+ ast_cli(fd, "%s%s:%c:%d:%s%s\n", prefix, node->x, node->is_pattern ? 'Y':'N', node->specificity, node->exten? "EXTEN:":"", node->exten ? node->exten->exten : "");
strcpy(my_prefix,prefix);
- strcat(my_prefix,"+-----------------");
+ strcat(my_prefix,"+ ");
if (node->next_char)
cli_match_char_tree(node->next_char, my_prefix, fd);
if (node->alt_char)
@@ -1106,7 +1106,7 @@
buf[1] = 0;
specif = 1;
}
-
+ m2 = 0;
if (already && (m2=already_in_tree(m1,buf)) && m2->next_char) {
if (!(*(s1+1))) /* if this is the end of the pattern, but not the end of the tree, then mark this node with the exten...
a shorter pattern might win if the longer one doesn't match */
@@ -4259,7 +4259,7 @@
if (option_debug && c->pattern_tree)
{
- ast_cli(fd," In-mem exten Trie for Fast Extension Pattern Matching:\r\b\n");
+ ast_cli(fd,"\r\n In-mem exten Trie for Fast Extension Pattern Matching:\r\n\r\n");
cli_match_char_tree(c->pattern_tree, " ", fd);
}
More information about the asterisk-commits
mailing list