diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-20 14:09:40 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-20 14:09:40 +0000 |
commit | 0699bad154c10539e31c46eeee1164990c955cbc (patch) | |
tree | 1dc9222a6ebec22b042d4735db647f6f2e2c8962 /cdr | |
parent | e24fc1a3de93bd0c77d2c3de48d9fc3550a1da50 (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: http://svn.digium.com/svn/asterisk/trunk@202109 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-rw-r--r-- | cdr/cdr_adaptive_odbc.c | 1 | ||||
-rw-r--r-- | cdr/cdr_pgsql.c | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/cdr/cdr_adaptive_odbc.c b/cdr/cdr_adaptive_odbc.c index 205c2075d..1d3199114 100644 --- a/cdr/cdr_adaptive_odbc.c +++ b/cdr/cdr_adaptive_odbc.c @@ -663,7 +663,6 @@ early_release: static int unload_module(void) { ast_cdr_unregister(name); - usleep(1); if (AST_RWLIST_WRLOCK(&odbc_tables)) { ast_cdr_register(name, ast_module_info->description, odbc_log); ast_log(LOG_ERROR, "Unable to lock column list. Unload failed.\n"); diff --git a/cdr/cdr_pgsql.c b/cdr/cdr_pgsql.c index 5e8e48673..75fb0f854 100644 --- a/cdr/cdr_pgsql.c +++ b/cdr/cdr_pgsql.c @@ -331,10 +331,9 @@ static int pgsql_log(struct ast_cdr *cdr) static int unload_module(void) { struct columns *current; + ast_cdr_unregister(name); - /* Give all threads time to finish */ - usleep(1); PQfinish(conn); if (pghostname) |