aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-30 21:11:44 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-30 21:11:44 +0000
commitb9e5510d228a6a258103294c00b4b908498a91dc (patch)
treeaa4c00b3baea6dfcb8f3992b87125780fec848dd /include/asterisk
parent571af1743b93081323b1f7a4e745aefbcf4fdf36 (diff)
Remove duplicate entries from voicemail format lists. This prevents app_voicemail from entering an infinite loop when the same format is specified twice in the format list.
(closes issue #15625) Reported by: Shagg63 Tested by: mnicholson Review: https://reviewboard.asterisk.org/r/429/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@231614 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/file.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asterisk/file.h b/include/asterisk/file.h
index 636309bc4..4b8c8fad9 100644
--- a/include/asterisk/file.h
+++ b/include/asterisk/file.h
@@ -35,6 +35,8 @@
extern "C" {
#endif
+/*! The maximum number of formats we expect to see in a format string */
+#define AST_MAX_FORMATS 10
/*! Convenient for waiting */
#define AST_DIGIT_ANY "0123456789#*ABCD"
@@ -402,6 +404,14 @@ off_t ast_tellstream(struct ast_filestream *fs);
*/
struct ast_frame *ast_readframe(struct ast_filestream *s);
+/*! Remove duplicate formats from a format string. */
+/*!
+ * \param fmts a format string, this string will be modified
+ * \retval NULL error
+ * \return a pointer to the reduced format string, this is a pointer to fmts
+ */
+char *ast_format_str_reduce(char *fmts);
+
/*! Initialize file stuff */
/*!
* Initializes all the various file stuff. Basically just registers the cli stuff