On Tue, 7 Feb 2006 [EMAIL PROTECTED] wrote:
> Author: jcollie
> Date: 2006-02-07 11:08:43 -0500 (Tue, 07 Feb 2006)
> New Revision: 1356
>
> Modified:
> openpbx/trunk/corelib/channel.c
> openpbx/trunk/corelib/generator.c
> openpbx/trunk/include/openpbx/generator.h
> Log:
> Commit patches from #111
>
> Modified: openpbx/trunk/corelib/channel.c
> ===================================================================
> --- openpbx/trunk/corelib/channel.c 2006-02-07 10:42:24 UTC (rev 1355)
> +++ openpbx/trunk/corelib/channel.c 2006-02-07 16:08:43 UTC (rev 1356)
> @@ -1489,8 +1489,8 @@
>
> /* Stop if we're a zombie or need a soft hangup */
> if (opbx_test_flag(chan, OPBX_FLAG_ZOMBIE) || opbx_check_hangup(chan)) {
> + opbx_mutex_unlock(&chan->lock);
> opbx_generator_deactivate(chan);
> - opbx_mutex_unlock(&chan->lock);
> return NULL;
> }
> prestate = chan->_state;
The patch looks good so far, but there are other locations where
opbx_generator_deactivate() is called with channel lock held, e.g.:
- corelib/channel.c in opbx_hangup()
- corelib/channel.c in opbx_read() (second occurance)
- corelib/channel.c in opbx_write()
Maybe it is possible to move the call to opbx_generator_deactivate()
out of the lock as well. The first one looks easy, but the other two
I'm not sure.
Armin
_______________________________________________
Openpbx-dev mailing list
[email protected]
http://lists.openpbx.org/mailman/listinfo/openpbx-dev