summaryrefslogtreecommitdiff
path: root/main/autoservice.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/autoservice.c')
-rw-r--r--main/autoservice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/autoservice.c b/main/autoservice.c
index 305ab23b1..f353f0e0c 100644
--- a/main/autoservice.c
+++ b/main/autoservice.c
@@ -300,11 +300,11 @@ int ast_autoservice_stop(struct ast_channel *chan)
res = 0;
}
+ ast_channel_lock(chan);
if (!as->orig_end_dtmf_flag) {
ast_clear_flag(ast_channel_flags(chan), AST_FLAG_END_DTMF_ONLY);
}
- ast_channel_lock(chan);
while ((f = AST_LIST_REMOVE_HEAD(&as->deferred_frames, frame_list))) {
if (!((1 << f->frametype) & as->ignore_frame_types)) {
ast_queue_frame_head(chan, f);