diff options
author | Jeff Peeler <jpeeler@digium.com> | 2008-04-30 16:14:43 +0000 |
---|---|---|
committer | Jeff Peeler <jpeeler@digium.com> | 2008-04-30 16:14:43 +0000 |
commit | 7cfd8389ac732bbddb5828913dc80d08c88c3138 (patch) | |
tree | 22724a6d195f621ed1ebe66609ba933e393451fa /channels | |
parent | 63f5e278426160f7c4efb5bebafc125f05106a25 (diff) |
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@114888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_console.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_console.c b/channels/chan_console.c index 4c8576db5..23931a8c3 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); |