mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
fix race condition
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -387,7 +387,7 @@ static int app_exec(struct ast_channel *chan, void *data)
|
|||||||
if (f->frametype == AST_FRAME_DTMF) {
|
if (f->frametype == AST_FRAME_DTMF) {
|
||||||
send_child_event(child_events, f->subclass, NULL, chan);
|
send_child_event(child_events, f->subclass, NULL, chan);
|
||||||
if (u->option_autoclear) {
|
if (u->option_autoclear) {
|
||||||
if (!u->playing_silence)
|
if (!u->list_cleared && !u->playing_silence)
|
||||||
send_child_event(child_events, 'T', NULL, chan);
|
send_child_event(child_events, 'T', NULL, chan);
|
||||||
AST_LIST_LOCK(&u->playlist);
|
AST_LIST_LOCK(&u->playlist);
|
||||||
while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) {
|
while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) {
|
||||||
@@ -431,7 +431,7 @@ static int app_exec(struct ast_channel *chan, void *data)
|
|||||||
send_child_event(child_events, 'Z', NULL, chan);
|
send_child_event(child_events, 'Z', NULL, chan);
|
||||||
strcpy(&input[2], "exception");
|
strcpy(&input[2], "exception");
|
||||||
}
|
}
|
||||||
if (!u->playing_silence)
|
if (!u->list_cleared && !u->playing_silence)
|
||||||
send_child_event(child_events, 'T', NULL, chan);
|
send_child_event(child_events, 'T', NULL, chan);
|
||||||
AST_LIST_LOCK(&u->playlist);
|
AST_LIST_LOCK(&u->playlist);
|
||||||
while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) {
|
while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) {
|
||||||
|
Reference in New Issue
Block a user