[Top][All Lists]
[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:37:15 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/05/02 13:37:15
Modified files:
. : ChangeLog
libbase : curl_adapter.cpp
Log message:
* libbase/curl_adapter.cpp (fill_cache): don't call
curl_multi_perform if not needed.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3062&r2=1.3063
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/curl_adapter.cpp?cvsroot=gnash&r1=1.28&r2=1.29
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3062
retrieving revision 1.3063
diff -u -b -r1.3062 -r1.3063
--- ChangeLog 2 May 2007 13:13:48 -0000 1.3062
+++ ChangeLog 2 May 2007 13:37:15 -0000 1.3063
@@ -1,7 +1,7 @@
2007-05-02 Sandro Santilli <address@hidden>
* libbase/curl_adapter.cpp (fill_cache): stop uselessly calling
- fstat().
+ fstat(); don't call curl_multi_perform if not needed.
* 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.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- libbase/curl_adapter.cpp 2 May 2007 13:13:48 -0000 1.28
+++ libbase/curl_adapter.cpp 2 May 2007 13:37:15 -0000 1.29
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: curl_adapter.cpp,v 1.28 2007/05/02 13:13:48 strk Exp $ */
+/* $Id: curl_adapter.cpp,v 1.29 2007/05/02 13:37:15 strk Exp $ */
#if defined(_WIN32) || defined(WIN32)
#define snprintf _snprintf
@@ -256,7 +256,7 @@
#endif
CURLMcode mcode;
- while (_running)
+ while (_cached < size && _running)
{
do
{
@@ -268,6 +268,9 @@
throw gnash::GnashException(curl_multi_strerror(mcode));
}
+ }
+
+ // TODO: check for 404 only once !
long code;
curl_easy_getinfo(_handle, CURLINFO_RESPONSE_CODE, &code);
if ( code == 404 ) // file not found!
@@ -275,22 +278,8 @@
gnash::log_error(_("404 response from url %s"),
_url.c_str());
_error = TU_FILE_OPEN_ERROR;
_running = false;
- return;
}
- // we already have that much data
- if ( _cached >= size )
- {
-#ifdef GNASH_CURL_VERBOSE
- fprintf(stderr,
- " big enough (%d), returning\n",
- statbuf.st_size);
-#endif
- return;
- }
-
-
- }
}