[gnash] Use a version of the DNS resolving fix which applies to 0.8.8 (from the upstream bug report).

Kevin Kofler kkofler at fedoraproject.org
Wed Oct 6 05:04:39 UTC 2010


commit e3dfc20dcaf9a1230aabf0d10152109d172eae45
Author: Kevin Kofler <Kevin at tigcc.ticalc.org>
Date:   Wed Oct 6 07:03:55 2010 +0200

    Use a version of the DNS resolving fix which applies to 0.8.8 (from the upstream bug report).

 gnash-0.8.8-libcurl721-DNS-resolving.patch |   41 +++++++++++++--------------
 1 files changed, 20 insertions(+), 21 deletions(-)
---
diff --git a/gnash-0.8.8-libcurl721-DNS-resolving.patch b/gnash-0.8.8-libcurl721-DNS-resolving.patch
index fc837b8..5cb2205 100644
--- a/gnash-0.8.8-libcurl721-DNS-resolving.patch
+++ b/gnash-0.8.8-libcurl721-DNS-resolving.patch
@@ -1,29 +1,28 @@
-From d7753930b9f710c6ee60af6d536d08e672db1491 Mon Sep 17 00:00:00 2001
-From: Rob Savoye <rob at welcomehome.org>
-Date: Sun, 03 Oct 2010 22:20:37 +0000
-Subject: give more time to DNS resolving so we can still connect with versions of libcurl newer than 7.21.x.
-
----
 diff --git a/libbase/curl_adapter.cpp b/libbase/curl_adapter.cpp
-index 4604bee..7e6dc7e 100644
+index 4604bee..c18209b 100644
 --- a/libbase/curl_adapter.cpp
 +++ b/libbase/curl_adapter.cpp
-@@ -660,8 +660,14 @@ CurlStreamFile::fillCache(std::streamsize size)
+@@ -657,10 +657,21 @@ CurlStreamFile::fillCache(std::streamsize size)
+ 
+         // A value of -1 means no file descriptors were added.
+         if (maxfd < 0) {
++            // As of libcurl 7.21.x, the DNS resolving appears to be going
++            // on in the background, so curl_multi_fdset fails to return
++            // anything useful. So we use the user timeout value to
++            // give DNS enough time to resolve the lookup.
++            if (userTimeout && lastProgress.elapsed() > userTimeout) {
++                log_error(_("Timeout (%u milliseconds) while waiting for "
++                       "the socket to become ready."), userTimeout);
++                break;
++            }
++            else {
  #if GNASH_CURL_VERBOSE
-             log_debug("No filedescriptors; breaking");
+-            log_debug("No filedescriptors; breaking");
++                log_debug("No curl filedescriptors, will perform again");
  #endif
 -            break;
--        }
-+	    if (userTimeout && lastProgress.elapsed() > userTimeout) {
-+		log_error(_("FIXME: Timeout (%u milliseconds) while loading "
-+			    "from url %s"), userTimeout, _url);
-+		break;
-+	    } else {
-+		continue;
-+	    }
-+	}
++                continue;
++            }
+         }
  
          FD_ZERO(&readfd);
-         FD_ZERO(&writefd);
---
-cgit v0.8.3.2


More information about the scm-commits mailing list