Don't bother calling AST_RWLIST_EMPTY on a list before AST_RWLIST_TRAVERSE, it's just a double check.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp 2007-07-23 23:05:18 +00:00
parent 922444c851
commit 58004e3741
1 changed files with 2 additions and 4 deletions

View File

@ -2657,10 +2657,8 @@ int __manager_event(int category, const char *event,
AST_LIST_UNLOCK(&sessions);
AST_RWLIST_RDLOCK(&manager_hooks);
if (!AST_RWLIST_EMPTY(&manager_hooks)) {
AST_RWLIST_TRAVERSE(&manager_hooks, hook, list) {
hook->helper(category, event, buf->str);
}
AST_RWLIST_TRAVERSE(&manager_hooks, hook, list) {
hook->helper(category, event, buf->str);
}
AST_RWLIST_UNLOCK(&manager_hooks);