diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-13 16:02:27 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-13 16:02:27 +0000 |
commit | 74f1c4d017d152210c0e5fa819686f2a9b51ef5a (patch) | |
tree | b3e7aa7f4b2f87b308e0d29bcbc0471d03f9651f /dnsmgr.c | |
parent | 2423e838767a040d39e7e2a034e7c25913881567 (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@45046 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'dnsmgr.c')
-rw-r--r-- | dnsmgr.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -147,7 +147,7 @@ static void *do_refresh(void *data) { for (;;) { pthread_testcancel(); - usleep(ast_sched_wait(sched)); + usleep((ast_sched_wait(sched)*1000)); pthread_testcancel(); ast_sched_runq(sched); } @@ -339,16 +339,16 @@ static int do_reload(int loading) /* if this reload enabled the manager, create the background thread if it does not exist */ - if (enabled && !was_enabled && (refresh_thread == AST_PTHREADT_NULL)) { - if (ast_pthread_create(&refresh_thread, NULL, do_refresh, NULL) < 0) { - ast_log(LOG_ERROR, "Unable to start refresh thread.\n"); - } - else { + if (enabled) { + if (!was_enabled && (refresh_thread == AST_PTHREADT_NULL)) { + if (ast_pthread_create(&refresh_thread, NULL, do_refresh, NULL) < 0) { + ast_log(LOG_ERROR, "Unable to start refresh thread.\n"); + } ast_cli_register(&cli_refresh); - /* make a background refresh happen right away */ - refresh_sched = ast_sched_add_variable(sched, 100, refresh_list, &master_refresh_info, 1); - res = 0; } + /* make a background refresh happen right away */ + refresh_sched = ast_sched_add_variable(sched, 100, refresh_list, &master_refresh_info, 1); + res = 0; } /* if this reload disabled the manager and there is a background thread, kill it */ |