From: Dwayne M. Hubbard Date: Tue, 24 Apr 2007 18:20:31 +0000 (+0000) Subject: removed #if 0 block from chan_phone, chan_zap, and chan_modem restart_monitor() X-Git-Tag: 1.2.18~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cde24d63377119ce3b58a71d4bba8221e1d38d6;p=thirdparty%2Fasterisk.git removed #if 0 block from chan_phone, chan_zap, and chan_modem restart_monitor() git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@61777 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_modem.c b/channels/chan_modem.c index a77519324b..d95d175bb9 100644 --- a/channels/chan_modem.c +++ b/channels/chan_modem.c @@ -717,10 +717,8 @@ static int restart_monitor() return -1; } if (monitor_thread != AST_PTHREADT_NULL) { + /* Wake up the thread */ pthread_kill(monitor_thread, SIGURG); -#if 0 - pthread_join(monitor_thread, NULL); -#endif } else { /* Start a new monitor */ if (ast_pthread_create(&monitor_thread, NULL, do_monitor, NULL) < 0) { diff --git a/channels/chan_phone.c b/channels/chan_phone.c index ad7b870130..669e87507d 100644 --- a/channels/chan_phone.c +++ b/channels/chan_phone.c @@ -1092,10 +1092,8 @@ static int restart_monitor() ast_log(LOG_WARNING, "Unable to lock the interface list\n"); return -1; } + /* Wake up the thread */ pthread_cancel(monitor_thread); -#if 0 - pthread_join(monitor_thread, NULL); -#endif ast_mutex_unlock(&iflock); } /* Start a new monitor */ diff --git a/channels/chan_zap.c b/channels/chan_zap.c index ab3e15ef75..0de98e70b4 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -6836,14 +6836,8 @@ static int restart_monitor(void) return -1; } if (monitor_thread != AST_PTHREADT_NULL) { - /* Just signal it to be sure it wakes up */ -#if 0 - pthread_cancel(monitor_thread); -#endif + /* Wake up the thread */ pthread_kill(monitor_thread, SIGURG); -#if 0 - pthread_join(monitor_thread, NULL); -#endif } else { /* Start a new monitor */ if (ast_pthread_create(&monitor_thread, &attr, do_monitor, NULL) < 0) {