Make sure we initialize attributes properly on thread (bug #1563)
authorMark Spencer <markster@digium.com>
Thu, 13 May 2004 18:23:34 +0000 (18:23 +0000)
committerMark Spencer <markster@digium.com>
Thu, 13 May 2004 18:23:34 +0000 (18:23 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2955 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index 969a35c..1ed2450 100755 (executable)
@@ -6178,6 +6178,10 @@ static void *pri_dchannel(void *vpri)
        int i;
        pthread_t threadid;
        pthread_attr_t attr;
+       
+       pthread_attr_init(&attr);
+       pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+
        gettimeofday(&lastidle, NULL);
        if (!ast_strlen_zero(pri->idledial) && !ast_strlen_zero(pri->idleext)) {
                /* Need to do idle dialing, check to be sure though */