summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
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);