]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
one more small tweak for thread-safety of TRACE_FRAMES
authorRussell Bryant <russell@russellbryant.com>
Mon, 31 Jul 2006 04:06:16 +0000 (04:06 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 31 Jul 2006 04:06:16 +0000 (04:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38547 65c4cc65-6c06-0410-ace0-fbb531ad65f3

frame.c

diff --git a/frame.c b/frame.c
index 81894483db4dc98f4919d196cd4f80fa3e8125ba..ed282f0c751558fc0346dca4aeb340602568e633 100644 (file)
--- a/frame.c
+++ b/frame.c
@@ -835,11 +835,11 @@ static int show_frame_stats(int fd, int argc, char *argv[])
        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>");
        }