# HG changeset patch # User nenolod # Date 1172333364 28800 # Node ID 88d78a61a9fb56e380aae1b45375703dd1ddeccd # Parent 6bc134eec1f3ad9972020d176805d401227aee63 [svn] - proxy support. somebody test this. diff -r 6bc134eec1f3 -r 88d78a61a9fb ChangeLog --- a/ChangeLog Sat Feb 24 07:49:06 2007 -0800 +++ b/ChangeLog Sat Feb 24 08:09:24 2007 -0800 @@ -1,3 +1,13 @@ +2007-02-24 15:49:06 +0000 William Pitcock + revision [1498] + - make use of the new id3_file_vfsopen() function. + Patch by Christian Birchinger (joker). + + trunk/src/madplug/input.c | 5 ++++- + trunk/src/madplug/replaygain.c | 25 +++++++++++++++++-------- + 2 files changed, 21 insertions(+), 9 deletions(-) + + 2007-02-24 13:58:15 +0000 Tony Vroon revision [1496] Steal parser from paranormal and make sure all datestamps are the same so yacc does not run. diff -r 6bc134eec1f3 -r 88d78a61a9fb src/curl/curl.c --- a/src/curl/curl.c Sat Feb 24 07:49:06 2007 -0800 +++ b/src/curl/curl.c Sat Feb 24 08:09:24 2007 -0800 @@ -22,6 +22,7 @@ #include #include +#include #include @@ -547,6 +548,55 @@ curl_easy_setopt(handle->curl, CURLOPT_FOLLOWLOCATION, 1); + + { + gboolean tmp = FALSE; + ConfigDb *db; + + db = bmp_cfg_db_open(); + + bmp_cfg_db_get_bool(db, NULL, "proxy_use", &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_int(db, NULL, "proxy_port", &proxy_port); + + curl_easy_setopt(handle->curl, CURLOPT_PROXY, proxy_host); + curl_easy_setopt(handle->curl, CURLOPT_PROXYPORT, proxy_port); + + tmp = FALSE; + + bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &tmp); + if (tmp == TRUE) + { + gchar *userbuf, *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", + 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); + + g_free(userbuf); + } + + if (proxy_host != NULL) + g_free(proxy_host); + } + } + { struct curl_slist *hdr = NULL; hdr = curl_slist_append(hdr, "icy-metadata:1");