r3886 - trunk/src/target/opkg
thomas at sita.openmoko.org
thomas at sita.openmoko.org
Fri Jan 18 16:05:08 CET 2008
Author: thomas
Date: 2008-01-18 16:05:07 +0100 (Fri, 18 Jan 2008)
New Revision: 3886
Modified:
trunk/src/target/opkg/opkg_download.c
Log:
* Add proxy username/password support
Modified: trunk/src/target/opkg/opkg_download.c
===================================================================
--- trunk/src/target/opkg/opkg_download.c 2008-01-18 14:25:29 UTC (rev 3885)
+++ trunk/src/target/opkg/opkg_download.c 2008-01-18 15:05:07 UTC (rev 3886)
@@ -144,6 +144,14 @@
curl_easy_setopt (curl, CURLOPT_WRITEDATA, file);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt (curl, CURLOPT_PROGRESSFUNCTION, curl_progress_func);
+ if (conf->http_proxy || conf->ftp_proxy)
+ {
+ char *userpwd;
+ sprintf_alloc (&userpwd, "%s:%s", conf->proxy_user,
+ conf->proxy_passwd);
+ curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, userpwd);
+ free (userpwd);
+ }
res = curl_easy_perform (curl);
curl_easy_cleanup (curl);
fclose (file);
More information about the commitlog
mailing list