summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 887bb84..fd87490 100644
--- a/src/main.c
+++ b/src/main.c
@@ -69,9 +69,17 @@ static void BarMainLoadProxy (const BarSettings_t *settings,
* firewalled fellows) */
if (settings->controlProxy != NULL) {
/* control proxy overrides global proxy */
- WaitressSetProxy (waith, settings->controlProxy);
+ if (!WaitressSetProxy (waith, settings->controlProxy)) {
+ /* if setting proxy fails, url is invalid */
+ BarUiMsg (settings, MSG_ERR, "Control proxy (%s) is invalid!\n",
+ settings->controlProxy);
+ }
} else if (settings->proxy != NULL && strlen (settings->proxy) > 0) {
- WaitressSetProxy (waith, settings->proxy);
+ if (!WaitressSetProxy (waith, settings->proxy)) {
+ /* if setting proxy fails, url is invalid */
+ BarUiMsg (settings, MSG_ERR, "Proxy (%s) is invalid!\n",
+ settings->proxy);
+ }
}
}