[asterisk-dev] [Code Review] AMI module reload causes deadlock.

rmudgett reviewboard at asterisk.org
Thu Mar 15 18:13:34 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1818/
-----------------------------------------------------------

Review request for Asterisk Developers.


Summary
-------

Steps to invoke the deadlock:
1) Invoke an AMI Command action such as "dialplan reload" or "originate".
2) The command then causes an external script to request another AMI Command action.
3) Deadlock because the current code only allows each registered AMI action to have one active instance at a time.

This patch avoids the deadlock and tries to keep a module unload from potentially causing a crash by an active AMI action using that module.


This addresses bug ASTERISK-19487.
    https://issues.asterisk.org/jira/browse/ASTERISK-19487


Diffs
-----

  /branches/1.8/include/asterisk/manager.h 359708 
  /branches/1.8/main/manager.c 359708 

Diff: https://reviewboard.asterisk.org/r/1818/diff


Testing
-------

Code inspection says it should work and the compiler agrees. :)


Thanks,

rmudgett

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120315/a3a6d8b7/attachment.htm>


More information about the asterisk-dev mailing list