aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_externalivr.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-25 18:30:02 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-08-25 18:30:02 +0000
commitacbdd8e3b6b38e7de432004e38252abf3596a40e (patch)
tree05831cf6af391f8258e67f7dbed4895962cee7df /apps/app_externalivr.c
parent333b70b1657e6c73387b5ac98f7ed72834e43c53 (diff)
fix race condition
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6408 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_externalivr.c')
-rwxr-xr-xapps/app_externalivr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c
index f54c0ec6c..4bfa62b9e 100755
--- a/apps/app_externalivr.c
+++ b/apps/app_externalivr.c
@@ -387,7 +387,7 @@ static int app_exec(struct ast_channel *chan, void *data)
if (f->frametype == AST_FRAME_DTMF) {
send_child_event(child_events, f->subclass, NULL, chan);
if (u->option_autoclear) {
- if (!u->playing_silence)
+ if (!u->list_cleared && !u->playing_silence)
send_child_event(child_events, 'T', NULL, chan);
AST_LIST_LOCK(&u->playlist);
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);
strcpy(&input[2], "exception");
}
- if (!u->playing_silence)
+ if (!u->list_cleared && !u->playing_silence)
send_child_event(child_events, 'T', NULL, chan);
AST_LIST_LOCK(&u->playlist);
while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list))) {