]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_dahdi.c: Lock private struct for ast_write(). 67/1067/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:23:16 +0000 (14:23 -0500)
commitfc4455216a07f00a389ff23c0178713bdca6b0af
tree6e40dee3a86df44a31c2f8d64bbff6e59f4039a2
parent739fca6084f2641d447956e59d56d1a851956196
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