aboutsummaryrefslogtreecommitdiffstats
path: root/main/channel.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-17 22:24:10 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-17 22:24:10 +0000
commited8ca6e7bcc35a5311ed46f314d4ecffe041b059 (patch)
treeef7e12bbf96ba7099e860497a27a213106551c31 /main/channel.c
parent6ecd4809b7c31e2b5f2c5e7af51edd0bdb3f4ce3 (diff)
optimize the 'quick response' code a bit more... no more malloc() or memset() for each response
expand stringfields API a bit to allow reusing the stringfield pool on a structure when needed, and remove some unnecessary code when the structure was being freed git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@45408 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/channel.c b/main/channel.c
index fa7a978fb..4bb49603c 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -664,7 +664,7 @@ struct ast_channel *ast_channel_alloc(int needqueue)
if (needqueue) {
if (pipe(tmp->alertpipe)) {
ast_log(LOG_WARNING, "Channel allocation failed: Can't create alert pipe!\n");
- ast_string_field_free_all(tmp);
+ ast_string_field_free_pools(tmp);
free(tmp);
return NULL;
} else {
@@ -1061,7 +1061,7 @@ void ast_channel_free(struct ast_channel *chan)
/* Destroy the jitterbuffer */
ast_jb_destroy(chan);
- ast_string_field_free_all(chan);
+ ast_string_field_free_pools(chan);
free(chan);
AST_LIST_UNLOCK(&channels);