[Asterisk-Dev] masquerade and ZOMBIE problem and question

Sergio Chersovani mlists at c-net.it
Wed Oct 26 13:31:51 MST 2005


Kevin P. Fleming ha scritto:

>> I guess the channel will stay there as zombie because the  
>> ast_queue_frame(clone, &null_frame); function does not free up (or 
>> hangups) the channel when it is zombie
>> am I right?
>
> The next time that ast_read() is called on the channel, it should 
> notice the 'zombie' status and clean up the channel.

I did already read the ast_read function, but there's nothing that free 
the channel. This is the code where the channel goes when it is ZOMBIE. 
So the ast_read returns NULL and the channel is still there. It should 
be safe to add ast_channelfree(chan); before exiting the function

    /* Stop if we're a zombie or need a soft hangup */
    if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) {
        if (chan->generator)
            ast_deactivate_generator(chan);
        ast_mutex_unlock(&chan->lock);
        return NULL;
    }




More information about the asterisk-dev mailing list