mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 02:48:29 +00:00
ao2_iterator: Mini-audit of the ao2_iterator loops in the new code files.
* Fixed several places where ao2_iterator_destroy() was not called. * Fixed several iterator loop object variable reference problems. * Fixed res_parking AMI actions returning non-zero. Only the AMI logoff action can return non-zero. Review: https://reviewboard.asterisk.org/r/3087/ ........ Merged revisions 404434 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -818,6 +818,7 @@ AST_TEST_DEFINE(cache_dump)
|
||||
RAII_VAR(struct stasis_message *, actual_cache_entry, obj, ao2_cleanup);
|
||||
ast_test_validate(test, actual_cache_entry == test_message1_1 || actual_cache_entry == test_message2_1);
|
||||
}
|
||||
ao2_iterator_destroy(&i);
|
||||
|
||||
/* Update snapshot 2 */
|
||||
test_message2_2 = cache_test_message_create(cache_type, "2", "2");
|
||||
@@ -836,6 +837,7 @@ AST_TEST_DEFINE(cache_dump)
|
||||
RAII_VAR(struct stasis_message *, actual_cache_entry, obj, ao2_cleanup);
|
||||
ast_test_validate(test, actual_cache_entry == test_message1_1 || actual_cache_entry == test_message2_2);
|
||||
}
|
||||
ao2_iterator_destroy(&i);
|
||||
|
||||
/* Clear snapshot 1 */
|
||||
test_message1_clear = stasis_cache_clear_create(test_message1_1);
|
||||
@@ -854,6 +856,7 @@ AST_TEST_DEFINE(cache_dump)
|
||||
RAII_VAR(struct stasis_message *, actual_cache_entry, obj, ao2_cleanup);
|
||||
ast_test_validate(test, actual_cache_entry == test_message2_2);
|
||||
}
|
||||
ao2_iterator_destroy(&i);
|
||||
|
||||
/* Dump the cache to ensure that it has no subscription change items in it since those aren't cached */
|
||||
ao2_cleanup(cache_dump);
|
||||
|
||||
Reference in New Issue
Block a user