gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog libbase/log.cpp libbase/log.h


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog libbase/log.cpp libbase/log.h
Date: Thu, 31 May 2007 12:34:45 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/05/31 12:34:45

Modified files:
        .              : ChangeLog 
        libbase        : log.cpp log.h 

Log message:
                * libbase/log.{cpp,h}: lock the io Mutex on closeLog, to
                  prevent race conditions between a thread using log()
                  and one using closeLog().

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3421&r2=1.3422
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.cpp?cvsroot=gnash&r1=1.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.h?cvsroot=gnash&r1=1.57&r2=1.58

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3421
retrieving revision 1.3422
diff -u -b -r1.3421 -r1.3422
--- ChangeLog   31 May 2007 11:20:47 -0000      1.3421
+++ ChangeLog   31 May 2007 12:34:44 -0000      1.3422
@@ -1,3 +1,9 @@
+2007-05-31 Sandro Santilli <address@hidden>
+
+       * libbase/log.{cpp,h}: lock the io Mutex on closeLog, to
+         prevent race conditions between a thread using log()
+         and one using closeLog().
+
 2007-05-31 Tomas Groth Christensen <address@hidden>
 
        * libbase/FLVParser.cpp: (FLVFrame* FLVParser::nextMediaFrame)

Index: libbase/log.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- libbase/log.cpp     25 May 2007 07:36:44 -0000      1.51
+++ libbase/log.cpp     31 May 2007 12:34:45 -0000      1.52
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: log.cpp,v 1.51 2007/05/25 07:36:44 strk Exp $ */
+/* $Id: log.cpp,v 1.52 2007/05/31 12:34:45 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -402,6 +402,7 @@
 bool
 LogFile::closeLog (void)
 {
+    boost::mutex::scoped_lock lock(_ioMutex);
     if (_state == OPEN) {
        _outstream.flush();
         _outstream.close();

Index: libbase/log.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.h,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- libbase/log.h       28 May 2007 15:41:02 -0000      1.57
+++ libbase/log.h       31 May 2007 12:34:45 -0000      1.58
@@ -101,7 +101,10 @@
     
     bool openLog(const char *filespec);
     bool removeLog(void);
+
+    // locks _ioMutex to prevent race conditions accessing _outstream
     bool closeLog(void);
+
     // accessors for the verbose level
     void setVerbosity (void) {
        _verbose++;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]