[asterisk-commits] russell: branch 1.2 r38546 -
/branches/1.2/frame.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Jul 30 21:04:02 MST 2006
Author: russell
Date: Sun Jul 30 23:04:02 2006
New Revision: 38546
URL: http://svn.digium.com/view/asterisk?rev=38546&view=rev
Log:
Make the frame counting done with TRACE_FRAMES defined thread-safe
Modified:
branches/1.2/frame.c
Modified: branches/1.2/frame.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/frame.c?rev=38546&r1=38545&r2=38546&view=diff
==============================================================================
--- branches/1.2/frame.c (original)
+++ branches/1.2/frame.c Sun Jul 30 23:04:02 2006
@@ -253,9 +253,9 @@
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 @@
}
if (fr->mallocd & AST_MALLOCD_HDR) {
#ifdef TRACE_FRAMES
+ ast_mutex_lock(&framelock);
headers--;
- ast_mutex_lock(&framelock);
if (fr->next)
fr->next->prev = fr->prev;
if (fr->prev)
More information about the asterisk-commits
mailing list