gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog libbase/curl_adapter.cpp


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog libbase/curl_adapter.cpp
Date: Wed, 02 May 2007 13:13:48 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/05/02 13:13:48

Modified files:
        .              : ChangeLog 
        libbase        : curl_adapter.cpp 

Log message:
                * libbase/curl_adapter.cpp (fill_cache): stop uselessly calling
                  fstat().

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3061&r2=1.3062
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/curl_adapter.cpp?cvsroot=gnash&r1=1.27&r2=1.28

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3061
retrieving revision 1.3062
diff -u -b -r1.3061 -r1.3062
--- ChangeLog   2 May 2007 12:39:08 -0000       1.3061
+++ ChangeLog   2 May 2007 13:13:48 -0000       1.3062
@@ -1,5 +1,7 @@
 2007-05-02 Sandro Santilli <address@hidden>
 
+       * libbase/curl_adapter.cpp (fill_cache): stop uselessly calling
+         fstat().
        * libbase/log.cpp: call the logfile singletone getter only once.
        * libbase/image.{cpp,h}: move documentation of the update() method
          from cpp to h file. This is the most time-expensive routine in 

Index: libbase/curl_adapter.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/curl_adapter.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- libbase/curl_adapter.cpp    18 Apr 2007 14:07:33 -0000      1.27
+++ libbase/curl_adapter.cpp    2 May 2007 13:13:48 -0000       1.28
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: curl_adapter.cpp,v 1.27 2007/04/18 14:07:33 jgilmore Exp $ */
+/* $Id: curl_adapter.cpp,v 1.28 2007/05/02 13:13:48 strk Exp $ */
 
 #if defined(_WIN32) || defined(WIN32)
 #define snprintf _snprintf
@@ -165,7 +165,7 @@
        std::string _postdata;
 
        // Current size of cached data
-       long _cached;
+       long unsigned _cached;
 
        // Attempt at filling the cache up to the given size.
        // Will call libcurl routines to fetch data.
@@ -255,8 +255,6 @@
        fprintf(stderr, "fill_cache(%d) called\n", size);
 #endif
 
-       struct stat statbuf;
-
        CURLMcode mcode;
        while (_running)
        {
@@ -281,8 +279,7 @@
                 }
 
                // we already have that much data
-               fstat(_cachefd, &statbuf);
-               if ( statbuf.st_size >= size )
+               if ( _cached >= size )
                {
 #ifdef GNASH_CURL_VERBOSE
                        fprintf(stderr,
@@ -314,7 +311,7 @@
        _running = 1;
        _error = 0;
 
-       _cached = -1;
+       _cached = 0;
 
        _handle = curl_easy_init();
        _mhandle = curl_multi_init();




reply via email to

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