]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_dahdi.c: Lock private struct for ast_write(). 64/1064/1
authorRichard Mudgett <rmudgett@digium.com>
Wed, 5 Aug 2015 19:21:50 +0000 (14:21 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 11 Aug 2015 18:50:18 +0000 (13:50 -0500)
commit800e0ea48de88c016e1f477edf7db7b9aadc4b54
treef30ebfe642aae953414fc40ac3b48bcd3efe6e92
parentc126afe18f9073f3ee74e45f574da421131b9fa2
chan_dahdi.c: Lock private struct for ast_write().

There is a window of opportunity for DTMF to not go out if an audio frame
is in the process of being written to DAHDI while another thread starts
sending DTMF.  The thread sending the audio frame could be past the
currently dialing check before being preempted by another thread starting
a DTMF generation request.  When the thread sending the audio frame
resumes it will then cause DAHDI to stop the DTMF tone generation.  The
result is no DTMF goes out.

* Made dahdi_write() lock the private struct before writing to the DAHDI
file descriptor.

ASTERISK-25315
Reported by John Hardin

Change-Id: Ib4e0264cf63305ed5da701188447668e72ec9abb
channels/chan_dahdi.c