Re: [PATCH] Move libcurl initialization to urlinstTransfer() (#537870).

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 18 Nov 2009, Chris Lumens wrote:

Recent trees have been giving errors when we get to the stage2 download
point, such as this one:

    Unable to retrieve http://download.fedoraproject.org/pub/fedora/linux/development/x86_64/os//images/install.img.

libcurl needs to be initialized inside urlinstTransfer() so it has the
latest network state for the system.  The above error is caused by old
DNS settings.  libcurl won't automatically do a res_init(), so we need
to set up a new curl instance and use that.

Since this patch moves curl usage to be exclusively within
urlinstTransfer(), move 'curl' to that function as well and remove it
from loaderData.

That's too bad, but okay.  At least we know what's going on.

     /* Clear out all the old settings, since libcurl preserves them for as
      * long as you use the same handle and settings might have changed.
      */
-    curl_easy_reset(loaderData->curl);
+    curl_easy_reset(curl);

We shouldn't need to call curl_easy_reset since we're getting rid of the
handle at the end of every call to urlinstTransfer, right?

That's a good point.  I'll remove the curl_easy_reset() line and test.
Assuming loader doesn't explode and spew library guts all over me, I'll
commit.

- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAksEddIACgkQ5hsjjIy1VknAdQCfUtYVnb/s4Y9LRB6WpVQ5ySXy
7bkAnjKOqPN4a4r+wsqvM1H63c5+0QFG
=x9gX
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux