[asterisk-commits] mmichelson: trunk r247381 - /trunk/main/test.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Feb 17 16:44:56 CST 2010
Author: mmichelson
Date: Wed Feb 17 16:44:53 2010
New Revision: 247381
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=247381
Log:
Fix a couple of bugs in test tab completion.
1. Add missing unlock of lists.
2. Swap order of arguments to test_cat_cmp in complete_test_name.
Modified:
trunk/main/test.c
Modified: trunk/main/test.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/test.c?view=diff&rev=247381&r1=247380&r2=247381
==============================================================================
--- trunk/main/test.c (original)
+++ trunk/main/test.c Wed Feb 17 16:44:53 2010
@@ -579,6 +579,7 @@
break;
}
}
+ AST_LIST_UNLOCK(&tests);
return ret;
}
@@ -591,11 +592,12 @@
AST_LIST_LOCK(&tests);
AST_LIST_TRAVERSE(&tests, test, entry) {
- if (!test_cat_cmp(category, test->info.category) && (!strncasecmp(word, test->info.name, wordlen) && ++which > state)) {
+ if (!test_cat_cmp(test->info.category, category) && (!strncasecmp(word, test->info.name, wordlen) && ++which > state)) {
ret = ast_strdup(test->info.name);
break;
}
}
+ AST_LIST_UNLOCK(&tests);
return ret;
}
More information about the asterisk-commits
mailing list