summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2010-07-29 14:08:56 +0200
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2010-07-30 10:43:56 +0200
commit6bbeaf581042e4e71b1cb9fde175369e54a99ede (patch)
treecdd1e9faad88b4973cf94985a2d4dae23f3b4a1b /src
parentdd509097513d17ad74013df2c5a037b1b1b48173 (diff)
downloadpianobar-6bbeaf581042e4e71b1cb9fde175369e54a99ede.tar.gz
pianobar-6bbeaf581042e4e71b1cb9fde175369e54a99ede.tar.bz2
pianobar-6bbeaf581042e4e71b1cb9fde175369e54a99ede.zip
Control proxy overrides global proxy
Now the control proxy setting overrides $http_proxy environment variable and proxy config setting.
Diffstat (limited to 'src')
-rw-r--r--src/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index 7a260fc..86bdaf1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -125,15 +125,15 @@ int main (int argc, char **argv) {
/* set up proxy (control proxy for non-us citizen or global proxy for poor
* firewalled fellows) */
- if (settings.proxy != NULL && strlen (settings.proxy) > 0) {
+ if (settings.controlProxy != NULL) {
+ /* control proxy overrides global proxy */
char tmpPath[2];
- WaitressSplitUrl (settings.proxy, waith.proxyHost,
+ WaitressSplitUrl (settings.controlProxy, waith.proxyHost,
sizeof (waith.proxyHost), waith.proxyPort,
sizeof (waith.proxyPort), tmpPath, sizeof (tmpPath));
- } else if (settings.controlProxy != NULL) {
- /* global proxy overrides control proxy */
+ } else if (settings.proxy != NULL && strlen (settings.proxy) > 0) {
char tmpPath[2];
- WaitressSplitUrl (settings.controlProxy, waith.proxyHost,
+ WaitressSplitUrl (settings.proxy, waith.proxyHost,
sizeof (waith.proxyHost), waith.proxyPort,
sizeof (waith.proxyPort), tmpPath, sizeof (tmpPath));
}