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:
parent
922444c851
commit
58004e3741
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue