diff options
author | blmpl <blm@poczta.fm> | 2016-10-15 10:10:52 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2016-10-15 10:13:00 +0200 |
commit | 79844540a83d7acaf8166b3081913f1968ebf78c (patch) | |
tree | 86ac1a7ba990661b0f4a063d165431f89d82e5f9 /src/ui.c | |
parent | 7c2d9ebb7f61cf04d75e28ca5cd6932002c4357b (diff) | |
download | pianobar-79844540a83d7acaf8166b3081913f1968ebf78c.tar.gz pianobar-79844540a83d7acaf8166b3081913f1968ebf78c.tar.bz2 pianobar-79844540a83d7acaf8166b3081913f1968ebf78c.zip |
Support binding to a specific network interface
Closes #597.
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -209,6 +209,15 @@ static CURLcode BarPianoHttpRequest (CURL * const http, setAndCheck (CURLOPT_CAINFO, settings->caBundle); } + if (settings->bindTo!= NULL) { + if (curl_easy_setopt (http, CURLOPT_INTERFACE, + settings->bindTo) != CURLE_OK) { + /* if binding fails, notice about that */ + BarUiMsg (settings, MSG_ERR, "bindTo (%s) is invalid!\n", + settings->bindTo); + } + } + /* set up proxy (control proxy for non-us citizen or global proxy for poor * firewalled fellows) */ if (settings->controlProxy != NULL) { |