]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_fax.c: Fix deadlock potential in FAXOPT(faxdetect) framehook. 45/3245/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:27:31 +0000 (13:27 -0500)
commit628e8c91d5c6a3e745bdb37e6593fd838b006393
tree695b098082938c6ec1370e8870b755feaad37f79
parent962c7ef5d91c546794313e01b4c264efdf3d1ead
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