Merged revisions 9404 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9404 | kpfleming | 2006-02-10 14:38:59 -0600 (Fri, 10 Feb 2006) | 2 lines

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: https://origsvn.digium.com/svn/asterisk/trunk@9405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2006-02-10 20:40:00 +00:00
parent b40bd71a9a
commit cadfcdfe8e
5 changed files with 7 additions and 21 deletions

View File

@@ -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>
*
@@ -338,9 +338,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 {