aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-30 16:15:36 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-30 16:15:36 +0000
commit6ac9725c30cf7ca9a1243db7716414686ebea3e6 (patch)
treedac374c8927a1497842514cb7f9893d0f13c2e66
parent7806f31dab2a91e601c4c9787ea65b9cbf77dc64 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.6.0@114889 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_console.c b/channels/chan_console.c
index 7d62e6235..7911b55b3 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);