Merged revisions 63830 via svnmerge from
authorJason Parker <jparker@digium.com>
Thu, 10 May 2007 23:16:33 +0000 (23:16 +0000)
committerJason Parker <jparker@digium.com>
Thu, 10 May 2007 23:16:33 +0000 (23:16 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r63830 | qwell | 2007-05-10 18:15:37 -0500 (Thu, 10 May 2007) | 12 lines

Merged revisions 63828 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r63828 | qwell | 2007-05-10 18:14:55 -0500 (Thu, 10 May 2007) | 4 lines

Fix an issue with trying to kill a thread before it gets created.

Issue 9709, patch by nic_bellamy.

........

................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@63832 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index a92e59c..8f6b373 100644 (file)
@@ -2506,7 +2506,8 @@ static int iax2_transmit(struct iax_frame *fr)
        AST_LIST_INSERT_TAIL(&queue, fr, list);
        AST_LIST_UNLOCK(&queue);
        /* Wake up the network and scheduler thread */
-       pthread_kill(netthreadid, SIGURG);
+       if (netthreadid != AST_PTHREADT_NULL)
+               pthread_kill(netthreadid, SIGURG);
        signal_condition(&sched_lock, &sched_cond);
        return 0;
 }