aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-27 20:57:00 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-27 20:57:00 +0000
commit371b257de0045a90119b5775a3c716b6bbab9f82 (patch)
treeffaa9b99b2e38a4cc20559c18f67abbff1a95893 /include
parentfb7d202d85815b3f4d7210aaecb47dd7d3728403 (diff)
Merged revisions 279946 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r279946 | dvossel | 2010-07-27 15:54:32 -0500 (Tue, 27 Jul 2010) | 24 lines Merged revisions 279945 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r279945 | dvossel | 2010-07-27 15:33:40 -0500 (Tue, 27 Jul 2010) | 19 lines remove empty audiohook write list on channel If a channel has an audiohook write list created on it, that list stays on the channel until the channel is destroyed. There is no reason to keep that list on the channel if it becomes empty. If it is empty that just means we are doing needless translating for every ast_read and ast_write. This patch removes the audiohook list from the channel once it is detected to be empty on either a read or write. If a audiohook is added back to the channel after this list is destroyed, the list just gets recreated as if it never existed to begin with. (closes issue #17630) Reported by: manvirr Review: https://reviewboard.asterisk.org/r/799/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@279949 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/audiohook.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asterisk/audiohook.h b/include/asterisk/audiohook.h
index 6d773bf90..abf6ca345 100644
--- a/include/asterisk/audiohook.h
+++ b/include/asterisk/audiohook.h
@@ -202,6 +202,13 @@ int ast_audiohook_detach_source(struct ast_channel *chan, const char *source);
*/
int ast_audiohook_remove(struct ast_channel *chan, struct ast_audiohook *audiohook);
+/*!
+ * \brief determines if a audiohook_list is empty or not.
+ *
+ * retval 0 false, 1 true
+ */
+int ast_audiohook_write_list_empty(struct ast_audiohook_list *audiohook_list);
+
/*! \brief Pass a frame off to be handled by the audiohook core
* \param chan Channel that the list is coming off of
* \param audiohook_list List of audiohooks