[svn-commits] dvossel: branch dvossel/test_api r235419 - /team/dvossel/test_api/main/test.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Dec 17 10:43:36 CST 2009


Author: dvossel
Date: Thu Dec 17 10:43:34 2009
New Revision: 235419

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=235419
Log:
remove use of AST_LIST_TRAVERSE_SAFE_BEGIN when AST_LIST_TRAVERSE would work.

Modified:
    team/dvossel/test_api/main/test.c

Modified: team/dvossel/test_api/main/test.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/test_api/main/test.c?view=diff&rev=235419&r1=235418&r2=235419
==============================================================================
--- team/dvossel/test_api/main/test.c (original)
+++ team/dvossel/test_api/main/test.c Thu Dec 17 10:43:34 2009
@@ -225,7 +225,7 @@
 	AST_LIST_LOCK(&tests);
 	/* clear previous execution results */
 	memset(&last_results, 0, sizeof(last_results));
-	AST_LIST_TRAVERSE_SAFE_BEGIN(&tests, test, entry) {
+	AST_LIST_TRAVERSE(&tests, test, entry) {
 
 		execute = 0;
 		switch (mode) {
@@ -286,7 +286,6 @@
 			}
 		}
 	}
-	AST_LIST_TRAVERSE_SAFE_END;
 	res = last_results.last_passed + last_results.last_failed;
 	AST_LIST_UNLOCK(&tests);
 
@@ -376,13 +375,12 @@
 	}
 
 	/* export each individual test */
-	AST_LIST_TRAVERSE_SAFE_BEGIN(&tests, test, entry) {
+	AST_LIST_TRAVERSE(&tests, test, entry) {
 		/* TODO XXX make this filter by matching category and name
 		 * like the function actually says it does */
 		test_xml_entry(test, f_xml);
 		test_txt_entry(test, f_txt);
 	}
-	AST_LIST_TRAVERSE_SAFE_END;
 	AST_LIST_UNLOCK(&tests);
 
 done:
@@ -571,7 +569,7 @@
 		}
 		ast_cli(a->fd, FORMAT, "Name", "Catagory", "Summary", "Test Result");
 		AST_LIST_LOCK(&tests);
-		AST_LIST_TRAVERSE_SAFE_BEGIN(&tests, test, entry) {
+		AST_LIST_TRAVERSE(&tests, test, entry) {
 			if ((a->argc == 4) ||
 				 ((a->argc == 5) && !test_cat_cmp(test->info.category, a->argv[4])) ||
 				 ((a->argc == 7) && !strcmp(test->info.category, a->argv[4]) && !strcmp(test->info.name, a->argv[6]))) {
@@ -580,7 +578,6 @@
 				count ++;
 			}
 		}
-		AST_LIST_TRAVERSE_SAFE_END;
 		AST_LIST_UNLOCK(&tests);
 		ast_cli(a->fd, "%d Registered Tests Matched\n", count);
 	default:
@@ -689,7 +686,7 @@
 
 		ast_cli(a->fd, FORMAT_RES_ALL, "Result", "", "Name", "Catagory", "Error Description");
 		AST_LIST_LOCK(&tests);
-		AST_LIST_TRAVERSE_SAFE_BEGIN(&tests, test, entry) {
+		AST_LIST_TRAVERSE(&tests, test, entry) {
 			if (test->state == AST_TEST_NOT_RUN) {
 				continue;
 			}
@@ -708,7 +705,6 @@
 					(test->state == AST_TEST_FAIL) ? S_OR(ast_str_buffer(test->args.ast_test_error_str), "Not Avaliable") : "");
 			}
 		}
-		AST_LIST_TRAVERSE_SAFE_END;
 		AST_LIST_UNLOCK(&tests);
 
 		ast_cli(a->fd, "%d Test(s) Executed  %d Passed  %d Failed\n", (failed + passed), passed, failed);




More information about the svn-commits mailing list