summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-16 11:38:19 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-16 11:38:19 +0200
commit5708e1a023c349af53383d8bfe52e2af65c597bc (patch)
treee09b659c08674808345cb36b0cf42f8f9d222d98 /src/main.c
parent852e19a64893fe3109a42719782c3099ec6ce3d5 (diff)
downloadpianobar-5708e1a023c349af53383d8bfe52e2af65c597bc.tar.gz
pianobar-5708e1a023c349af53383d8bfe52e2af65c597bc.tar.bz2
pianobar-5708e1a023c349af53383d8bfe52e2af65c597bc.zip
client: Proxy type config option added
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index e893b1d..a1041e7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -292,8 +292,11 @@ int main (int argc, char **argv) {
PianoInit (&ph);
/* setup control connection */
- curl_easy_setopt (ph.curlHandle, CURLOPT_PROXY, bsettings.controlProxy);
- curl_easy_setopt (ph.curlHandle, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4A);
+ if (bsettings.controlProxy != NULL && bsettings.controlProxyType != -1) {
+ curl_easy_setopt (ph.curlHandle, CURLOPT_PROXY, bsettings.controlProxy);
+ curl_easy_setopt (ph.curlHandle, CURLOPT_PROXYTYPE,
+ bsettings.controlProxyType);
+ }
curl_easy_setopt (ph.curlHandle, CURLOPT_CONNECTTIMEOUT, 60);
termSetBuffer (0);