diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-04 18:59:48 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-04 18:59:48 +0000 |
commit | fd4c3d29ad01732ee09184cddf9345ab47ca7f51 (patch) | |
tree | ab612bbdd339df890922f090c5a61f31c7a6d837 /channels/chan_h323.c | |
parent | cf7ea7664658597f38d3a04fc1cd3a7ff12e7de1 (diff) |
Recorded merge of revisions 154263 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r154263 | tilghman | 2008-11-04 12:58:05 -0600 (Tue, 04 Nov 2008) | 3 lines
Make the monitor thread non-detached, so it can be joined (suggested by Russell
on -dev list).
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154264 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_h323.c')
-rw-r--r-- | channels/chan_h323.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c index cd6ca8e5f..13526b9e5 100644 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -2604,7 +2604,7 @@ static int restart_monitor(void) pthread_kill(monitor_thread, SIGURG); } else { /* Start a new monitor */ - if (ast_pthread_create_detached_background(&monitor_thread, NULL, do_monitor, NULL) < 0) { + if (ast_pthread_create_background(&monitor_thread, NULL, do_monitor, NULL) < 0) { monitor_thread = AST_PTHREADT_NULL; ast_mutex_unlock(&monlock); ast_log(LOG_ERROR, "Unable to start monitor thread.\n"); @@ -3320,8 +3320,7 @@ static int unload_module(void) pthread_cancel(monitor_thread); } pthread_kill(monitor_thread, SIGURG); - /* Cannot join detached threads */ - /* pthread_join(monitor_thread, NULL); */ + pthread_join(monitor_thread, NULL); } monitor_thread = AST_PTHREADT_STOP; ast_mutex_unlock(&monlock); |