diff options
author | Russell Bryant <russell@russellbryant.com> | 2009-06-20 14:09:40 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2009-06-20 14:09:40 +0000 |
commit | b390327dd792d942629394a731107854bd18d526 (patch) | |
tree | 1dc9222a6ebec22b042d4735db647f6f2e2c8962 /main | |
parent | 55c6789f74d7408d2dce21c61d3db6564c1100f7 (diff) |
Remove unnecessary usleep() from a couple of module unload callbacks.
In passing, also tweak cdr_unregister() to hold the list lock a bit less time.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r-- | main/cdr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/cdr.c b/main/cdr.c index 3f7b9aee2..610c2ab31 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -148,13 +148,16 @@ void ast_cdr_unregister(const char *name) AST_RWLIST_TRAVERSE_SAFE_BEGIN(&be_list, i, list) { if (!strcasecmp(name, i->name)) { AST_RWLIST_REMOVE_CURRENT(list); - ast_verb(2, "Unregistered '%s' CDR backend\n", name); - ast_free(i); break; } } AST_RWLIST_TRAVERSE_SAFE_END; AST_RWLIST_UNLOCK(&be_list); + + if (i) { + ast_verb(2, "Unregistered '%s' CDR backend\n", name); + ast_free(i); + } } int ast_cdr_isset_unanswered(void) |