[asterisk-commits] rizzo: branch 1.4 r47672 -
/branches/1.4/main/cli.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Nov 15 10:46:46 MST 2006
Author: rizzo
Date: Wed Nov 15 11:46:45 2006
New Revision: 47672
URL: http://svn.digium.com/view/asterisk?view=rev&rev=47672
Log:
fix longest match search in find_cli.
Trunk already fixed.
1.2 not affected (well, i have no idea, the code is totally
different there).
Modified:
branches/1.4/main/cli.c
Modified: branches/1.4/main/cli.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/cli.c?view=diff&rev=47672&r1=47671&r2=47672
==============================================================================
--- branches/1.4/main/cli.c (original)
+++ branches/1.4/main/cli.c Wed Nov 15 11:46:45 2006
@@ -1378,8 +1378,10 @@
continue;
/* we are in case match_type == -1 and mismatch on last word */
}
- if (cand == NULL || y > matchlen) /* remember the candidate */
+ if (y > matchlen) { /* remember the candidate */
+ matchlen = y;
cand = e;
+ }
}
return e ? e : cand;
}
More information about the asterisk-commits
mailing list