From: Jeff Peeler Date: Sun, 8 Jun 2008 01:41:59 +0000 (+0000) Subject: This was accidentally reverted. X-Git-Tag: 1.6.2.0-beta1~2058 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33b3d38a3cdc5dd7233c5803a863acc466f87624;p=thirdparty%2Fasterisk.git This was accidentally reverted. Fixes a bug where if a stream monitor thread was not created (caused from failure of opening or starting the stream) pthread_cancel was called with an invalid thread ID. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121163 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_console.c b/channels/chan_console.c index 4ad5e793c8..10f77fdc79 100644 --- a/channels/chan_console.c +++ b/channels/chan_console.c @@ -393,7 +393,7 @@ return_unlock: static int stop_stream(struct console_pvt *pvt) { - if (!pvt->streamstate) + if (!pvt->streamstate || pvt->thread == AST_PTHREADT_NULL) return 0; pthread_cancel(pvt->thread);