From d4f34710bffa57cf8c0580351ac04adf9572d311 Mon Sep 17 00:00:00 2001 From: Jeff Peeler Date: Wed, 30 Apr 2008 16:15:36 +0000 Subject: [PATCH] Merged revisions 114888 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r114888 | jpeeler | 2008-04-30 11:14:43 -0500 (Wed, 30 Apr 2008) | 3 lines 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/branches/1.6.0@114889 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_console.c b/channels/chan_console.c index 7d62e6235c..7911b55b3f 100644 --- a/channels/chan_console.c +++ b/channels/chan_console.c @@ -391,7 +391,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);