diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-03 23:14:54 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-03 23:14:54 +0000 |
commit | 96aba6e67cfa62a6b6052d74e154f02434ecf929 (patch) | |
tree | 50acf74ce8dea9b65a36c450238b8f199efe411b /include/asterisk/frame.h | |
parent | 340c6f047bf3406eea630aaf8d00f4dec0f5a016 (diff) |
Add the ability to specify that a frame should not be considered for caching
for uses in cases where you *know* that it will do no good. This patch was
inspired by file for use in some work of his on mixmonitor/chanspy.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41958 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/frame.h')
-rw-r--r-- | include/asterisk/frame.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h index bc7273a09..4cc0cd576 100644 --- a/include/asterisk/frame.h +++ b/include/asterisk/frame.h @@ -31,6 +31,8 @@ extern "C" { #include <sys/types.h> #include <sys/time.h> + +#include "asterisk/compiler.h" #include "asterisk/endian.h" #include "asterisk/linkedlists.h" @@ -354,12 +356,18 @@ struct ast_option_header { struct ast_frame *ast_fralloc(char *source, int len); #endif -/*! \brief Frees a frame +/*! + * \brief Frees a frame + * * \param fr Frame to free - * Free a frame, and the memory it used if applicable - * \return no return. + * \param cache Whether to consider this frame for frame caching */ -void ast_frfree(struct ast_frame *fr); +void ast_frame_free(struct ast_frame *fr, int cache); + +static void force_inline ast_frfree(struct ast_frame *fr) +{ + ast_frame_free(fr, 1); +} /*! \brief Makes a frame independent of any static storage * \param fr frame to act upon |