diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-31 04:04:02 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-31 04:04:02 +0000 |
commit | cb7a95bdc5d1784a271701f5152d9bc951a650d0 (patch) | |
tree | 8d0055f35690e54056364fba6ab0dd41a9e9242f /frame.c | |
parent | def6ee3d1609b3acba0a2f543de6127af82992b9 (diff) |
Make the frame counting done with TRACE_FRAMES defined thread-safe
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@38546 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'frame.c')
-rw-r--r-- | frame.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -253,9 +253,9 @@ static struct ast_frame *ast_frame_header_new(void) memset(f, 0, sizeof(struct ast_frame)); #ifdef TRACE_FRAMES if (f) { - headers++; f->prev = NULL; ast_mutex_lock(&framelock); + headers++; f->next = headerlist; if (headerlist) headerlist->prev = f; @@ -282,8 +282,8 @@ void ast_frfree(struct ast_frame *fr) } if (fr->mallocd & AST_MALLOCD_HDR) { #ifdef TRACE_FRAMES - headers--; ast_mutex_lock(&framelock); + headers--; if (fr->next) fr->next->prev = fr->prev; if (fr->prev) |