Fix some astobj2 iterator breakage, add another unit test.

Review: https://reviewboard.asterisk.org/r/1254/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2011-06-03 18:25:11 +00:00
parent a0468ca7fa
commit 6357719a82
2 changed files with 133 additions and 5 deletions

View File

@@ -734,10 +734,6 @@ static void *internal_ao2_callback(struct ao2_container *c,
}
ast_free(cur); /* free the link record */
}
if ((match) && (!(flags & OBJ_UNLINK))) {
AST_LIST_REMOVE_CURRENT(entry);
AST_LIST_INSERT_HEAD(&c->buckets[i], cur, entry);
}
if ((match & CMP_STOP) || !(flags & OBJ_MULTIPLE)) {
/* We found our only (or last) match, so force an exit from