[asterisk-commits] russell: branch russell/frame_caching r38550 -
/team/russell/frame_caching/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Jul 30 21:17:38 MST 2006
Author: russell
Date: Sun Jul 30 23:17:37 2006
New Revision: 38550
URL: http://svn.digium.com/view/asterisk?rev=38550&view=rev
Log:
Merged revisions 38548 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r38548 | russell | 2006-07-31 00:10:43 -0400 (Mon, 31 Jul 2006) | 15 lines
Merged revisions 38546-38547 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r38546 | russell | 2006-07-31 00:04:02 -0400 (Mon, 31 Jul 2006) | 2 lines
Make the frame counting done with TRACE_FRAMES defined thread-safe
........
r38547 | russell | 2006-07-31 00:06:16 -0400 (Mon, 31 Jul 2006) | 2 lines
one more small tweak for thread-safety of TRACE_FRAMES
........
................
Modified:
team/russell/frame_caching/ (props changed)
team/russell/frame_caching/frame.c
Propchange: team/russell/frame_caching/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/russell/frame_caching/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Jul 30 23:17:37 2006
@@ -1,1 +1,1 @@
-/trunk:1-38544
+/trunk:1-38549
Modified: team/russell/frame_caching/frame.c
URL: http://svn.digium.com/view/asterisk/team/russell/frame_caching/frame.c?rev=38550&r1=38549&r2=38550&view=diff
==============================================================================
--- team/russell/frame_caching/frame.c (original)
+++ team/russell/frame_caching/frame.c Sun Jul 30 23:17:37 2006
@@ -255,9 +255,9 @@
struct ast_frame *f = ast_calloc(1, sizeof(*f));
#ifdef TRACE_FRAMES
if (f) {
- headers++;
f->prev = NULL;
ast_mutex_lock(&framelock);
+ headers++;
f->next = headerlist;
if (headerlist)
headerlist->prev = f;
@@ -284,8 +284,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)
@@ -860,11 +860,11 @@
int x=1;
if (argc != 3)
return RESULT_SHOWUSAGE;
+ ast_mutex_lock(&framelock);
ast_cli(fd, " Framer Statistics \n");
ast_cli(fd, "---------------------------\n");
ast_cli(fd, "Total allocated headers: %d\n", headers);
ast_cli(fd, "Queue Dump:\n");
- ast_mutex_lock(&framelock);
for (f=headerlist; f; f = f->next) {
ast_cli(fd, "%d. Type %d, subclass %d from %s\n", x++, f->frametype, f->subclass, f->src ? f->src : "<Unknown>");
}
More information about the asterisk-commits
mailing list