]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix an issue with trying to kill a thread before it gets created.
authorJason Parker <jparker@digium.com>
Thu, 10 May 2007 23:14:55 +0000 (23:14 +0000)
committerJason Parker <jparker@digium.com>
Thu, 10 May 2007 23:14:55 +0000 (23:14 +0000)
Issue 9709, patch by nic_bellamy.

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

channels/chan_iax2.c

index d11b0b4b8e984cb9383ffca2742390c1bca4db05..f9821eabe4cb6dffdbca9a4d93192b90e532576b 100644 (file)
@@ -2563,7 +2563,8 @@ static int iax2_transmit(struct iax_frame *fr)
        iaxq.count++;
        ast_mutex_unlock(&iaxq.lock);
        /* Wake up the network thread */
-       pthread_kill(netthreadid, SIGURG);
+       if (netthreadid != AST_PTHREADT_NULL)
+               pthread_kill(netthreadid, SIGURG);
        return 0;
 }