[asterisk-dev] Who can explain this? chanzap zt_fixup / zt_indicate

Paulo Garcia paulo.astdev at gmail.com
Tue Nov 7 12:36:43 MST 2006


Hi,

I'm trying to figure out how it works without a deadlock...

The zt_fixup function do a mutex_lock using p->lock handler.
(ast_mutex_lock(&p->lock);)

Within the mutex block, the zt_indicate function can be called:

    if (newchan->_state == AST_STATE_RINGING)
        zt_indicate(newchan, AST_CONTROL_RINGING);

But, within zt_indicate function, the ast_mutex_lock(&p->lock); is called
again.

Is this correct?


Thanks in advance

Paulo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20061107/fa490ddf/attachment.htm


More information about the asterisk-dev mailing list