aboutsummaryrefslogtreecommitdiffstats
path: root/main/frame.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-03 23:14:54 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-03 23:14:54 +0000
commit96aba6e67cfa62a6b6052d74e154f02434ecf929 (patch)
tree50acf74ce8dea9b65a36c450238b8f199efe411b /main/frame.c
parent340c6f047bf3406eea630aaf8d00f4dec0f5a016 (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 'main/frame.c')
-rw-r--r--main/frame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/frame.c b/main/frame.c
index ba47f7308..17da73f4c 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -317,12 +317,12 @@ static void frame_cache_cleanup(void *data)
free(frames);
}
-void ast_frfree(struct ast_frame *fr)
+void ast_frame_free(struct ast_frame *fr, int cache)
{
if (!fr->mallocd)
return;
- if (fr->mallocd == AST_MALLOCD_HDR) {
+ if (cache && fr->mallocd == AST_MALLOCD_HDR) {
/* Cool, only the header is malloc'd, let's just cache those for now
* to keep things simple... */
struct ast_frame_cache *frames;