diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-06 15:59:17 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-06 15:59:17 +0000 |
commit | daf0032d069ed93fda093af38a782c5218290156 (patch) | |
tree | e99ed2cd84ef8a79129f88abccc945e339cda34c /main/audiohook.c | |
parent | 9dab0c5f18d259b969aba05592b04816bbaa1d8b (diff) |
Always detach and destroy the whisper and barge audiohooks. Additionally also allow an audiohook to be detached if it has not been attached.
(closes issue #14414)
Reported by: bluecrow76
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173902 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/audiohook.c')
-rw-r--r-- | main/audiohook.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/audiohook.c b/main/audiohook.c index 262d5d496..2b0beac01 100644 --- a/main/audiohook.c +++ b/main/audiohook.c @@ -354,7 +354,7 @@ int ast_audiohook_attach(struct ast_channel *chan, struct ast_audiohook *audioho */ int ast_audiohook_detach(struct ast_audiohook *audiohook) { - if (audiohook->status == AST_AUDIOHOOK_STATUS_DONE) + if (audiohook->status == AST_AUDIOHOOK_STATUS_NEW || audiohook->status == AST_AUDIOHOOK_STATUS_DONE) return 0; audiohook->status = AST_AUDIOHOOK_STATUS_SHUTDOWN; |