Skip to content
Snippets Groups Projects
Commit 33b3d38a authored by Jeff Peeler's avatar Jeff Peeler
Browse files

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
parent c1b88b3c
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment