Mercurial > audlegacy-plugins
changeset 717:c1ec0d8d9553 trunk
[svn] - store proxy info
author | nenolod |
---|---|
date | Sat, 24 Feb 2007 10:32:25 -0800 |
parents | 1f6525272597 |
children | d252f02a9beb |
files | ChangeLog src/curl/curl.c |
diffstat | 2 files changed, 25 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Feb 24 10:21:48 2007 -0800 +++ b/ChangeLog Sat Feb 24 10:32:25 2007 -0800 @@ -1,3 +1,10 @@ +2007-02-24 18:21:48 +0000 Jonathan Schleifer <js@h3c.de> + revision [1518] + We don't need .pc.in files for FLAC... + trunk/src/flac113/libflac/flac.pc.in | 10 ---------- + 1 file changed, 10 deletions(-) + + 2007-02-24 18:20:58 +0000 Jonathan Schleifer <js@h3c.de> revision [1516] Import flac. Please test.
--- a/src/curl/curl.c Sat Feb 24 10:21:48 2007 -0800 +++ b/src/curl/curl.c Sat Feb 24 10:32:25 2007 -0800 @@ -75,6 +75,11 @@ gchar *name; gchar *title; + + struct { + gchar *proxy_host; + gchar *proxy_auth; + } proxy_info; }; VFSConstructor curl_const; @@ -557,13 +562,13 @@ bmp_cfg_db_get_bool(db, NULL, "use_proxy", &tmp); if (tmp == TRUE) { - gchar *proxy_host = NULL; gint proxy_port = 0; - bmp_cfg_db_get_string(db, NULL, "proxy_host", &proxy_host); + bmp_cfg_db_get_string(db, NULL, "proxy_host", + &handle->proxy_info.proxy_host); bmp_cfg_db_get_int(db, NULL, "proxy_port", &proxy_port); - curl_easy_setopt(handle->curl, CURLOPT_PROXY, proxy_host); + curl_easy_setopt(handle->curl, CURLOPT_PROXY, handle->proxy_info.proxy_host); curl_easy_setopt(handle->curl, CURLOPT_PROXYPORT, proxy_port); tmp = FALSE; @@ -571,28 +576,20 @@ bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &tmp); if (tmp == TRUE) { - gchar *userbuf, *proxy_user = NULL, *proxy_pass = NULL; + gchar *proxy_user = NULL, *proxy_pass = NULL; bmp_cfg_db_get_string(db, NULL, "proxy_user", &proxy_user); bmp_cfg_db_get_string(db, NULL, "proxy_pass", &proxy_pass); - userbuf = g_strdup_printf("%s:%s", + handle->proxy_info.proxy_auth = g_strdup_printf("%s:%s", proxy_user != NULL ? proxy_user : "", proxy_pass != NULL ? proxy_pass : ""); - if (proxy_user != NULL) - g_free(proxy_user); - - if (proxy_pass != NULL) - g_free(proxy_pass); - - curl_easy_setopt(handle->curl, CURLOPT_PROXYUSERPWD, userbuf); + curl_easy_setopt(handle->curl, CURLOPT_PROXYUSERPWD, + handle->proxy_info.proxy_auth); g_free(userbuf); } - - if (proxy_host != NULL) - g_free(proxy_host); } bmp_cfg_db_close(db); @@ -640,6 +637,12 @@ g_slist_free(handle->stream_stack); curl_easy_cleanup(handle->curl); + if (handle->proxy_info.proxy_host != NULL) + g_free(handle->proxy_info.proxy_host); + + if (handle->proxy_info.proxy_auth != NULL) + g_free(handle->proxy_info.proxy_auth); + if (handle->download) { vfs_fclose(handle->download);