aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-29 15:39:21 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-29 15:39:21 +0000
commitb511109d75c931dbf4a445f0ca54f3d3e1e70eb4 (patch)
treebaa215617a4776b90a618df9fc4bdd8f2c2dc352 /include
parentae452e71b9b39296950e8d9607b1e9ef7d3e92bc (diff)
Merged revisions 260050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r260050 | dvossel | 2010-04-29 10:33:27 -0500 (Thu, 29 Apr 2010) | 21 lines Merged revisions 260049 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r260049 | dvossel | 2010-04-29 10:31:02 -0500 (Thu, 29 Apr 2010) | 14 lines Fixes crash in audiohook_write_list The middle_frame in the audiohook_write_list function was being freed if a audiohook manipulator returned a failure. This is incorrect logic. This patch resolves this and adds detailed descriptions of how this function should work and why manipulator failures must be ignored. (closes issue #17052) Reported by: dvossel Tested by: dvossel (closes issue #16196) Reported by: atis Review: https://reviewboard.asterisk.org/r/623/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@260053 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/audiohook.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/asterisk/audiohook.h b/include/asterisk/audiohook.h
index 0a36bb934..dc6c3e1f3 100644
--- a/include/asterisk/audiohook.h
+++ b/include/asterisk/audiohook.h
@@ -73,9 +73,16 @@ struct ast_audiohook;
* \param chan Channel
* \param frame Frame of audio to manipulate
* \param direction Direction frame came from
- * \return Returns 0 on success, -1 on failure
- * \note An audiohook does not have any reference to a private data structure for manipulate types. It is up to the manipulate callback to store this data
- * via it's own method. An example would be datastores.
+ * \return Returns 0 on success, -1 on failure.
+ * \note An audiohook does not have any reference to a private data structure for manipulate
+ * types. It is up to the manipulate callback to store this data via it's own method.
+ * An example would be datastores.
+ * \note The input frame should never be freed or corrupted during a manipulate callback.
+ * If the callback has the potential to corrupt the frame's data during manipulation,
+ * local data should be used for the manipulation and only copied to the frame on
+ * success.
+ * \note A failure return value indicates that the frame was not manipulated and that
+ * is being returned in its original state.
*/
typedef int (*ast_audiohook_manipulate_callback)(struct ast_audiohook *audiohook, struct ast_channel *chan, struct ast_frame *frame, enum ast_audiohook_direction direction);