]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_fax.c: Fix deadlock potential in FAXOPT(faxdetect) framehook. 49/3249/1
authorRichard Mudgett <rmudgett@digium.com>
Tue, 12 Jul 2016 22:33:29 +0000 (17:33 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 19 Jul 2016 18:31:50 +0000 (13:31 -0500)
commit9abbea162c75c8a3485722fa22b4d5c9ee641132
treee9600379fdbf7fa82871511b9f8a5c7c1e6948db
parent943bb48b59435e00131cbd56b075f73f57d10e87
res_fax.c: Fix deadlock potential in FAXOPT(faxdetect) framehook.

The fax_detect_framehook() has the potential to deadlock if an incoming
fax happens during the Playback or similar application.

* Fixed the potential deadlock by not calling ast_async_goto() with the
channel lock held.

* Made always eat the fax detection frame whether there is a fax extension
or not.

* Made only detach the framehook if we detected a fax and not on other
possible frames.

ASTERISK-26216
Reported by: Richard Mudgett

Change-Id: I99da35c26d1cd802626ffb4c1b4eb5b015581b6d
res/res_fax.c