]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_dahdi.c: Lock private struct for ast_write(). 61/1061/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 19:09:00 +0000 (14:09 -0500)
commitf43ea74e9eb18eaead46a08ac287ee5ce0ad798a
treee6f19aedef3eae38f673b94779b6bc7fd7a969cd
parent06b464ab1b7c42e3c1b5b05463d5bc73c112dd76
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