aboutsummaryrefslogtreecommitdiffstats
path: root/dnsmgr.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-10 20:38:59 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-10 20:38:59 +0000
commitd65a5a061e703b5cc566acde1aef62a7a777a405 (patch)
tree3b7bb54f27e7071dfc8c67cfae8f6ea4d3940120 /dnsmgr.c
parent4416abd9601b2a1deabeaacb98d04ac2b259d767 (diff)
don't create monitor threads in detached mode, when we need to be able to pthread_join() them later if the module is unloaded (solve crash-on-unload problem for these channel modules)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@9404 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'dnsmgr.c')
-rw-r--r--dnsmgr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/dnsmgr.c b/dnsmgr.c
index 204033e15..bc577c852 100644
--- a/dnsmgr.c
+++ b/dnsmgr.c
@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
- * Copyright (C) 2005, Kevin P. Fleming
+ * Copyright (C) 2005-2006, Kevin P. Fleming
*
* Kevin P. Fleming <kpfleming@digium.com>
*
@@ -342,9 +342,7 @@ 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)) {
- pthread_attr_init(&attr);
- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- if (ast_pthread_create(&refresh_thread, &attr, do_refresh, NULL) < 0) {
+ if (ast_pthread_create(&refresh_thread, NULL, do_refresh, NULL) < 0) {
ast_log(LOG_ERROR, "Unable to start refresh thread.\n");
}
else {