From 0fda775ebd32b230179c200b89ebd520d9a9e4a2 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 4 May 2012 20:36:35 +0200 Subject: Revert "Add force_tls setting" This reverts commit 35763dea799c96361e288a10eab0fbd16c36e880. It does not work with the JSON API. --- contrib/pianobar.1 | 5 ----- src/settings.c | 3 --- src/settings.h | 1 - src/ui.c | 7 +++---- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/contrib/pianobar.1 b/contrib/pianobar.1 index 4c76e2f..da87270 100644 --- a/contrib/pianobar.1 +++ b/contrib/pianobar.1 @@ -194,11 +194,6 @@ Location of control fifo. Defaults to $XDG_CONFIG_HOME/pianobar/ctl (which is usually the value above). See section .B REMOTE CONTROL -.TP -.B force_tls = {0,1} -Use TLS for all actions (not just sending login credentials). Use if you are on -an untrusted network or to get around GeoIP restrictions. - .TP .B format_list_song = %i) %a - %t%r Available format characters: diff --git a/src/settings.c b/src/settings.c index d603387..1eeec50 100644 --- a/src/settings.c +++ b/src/settings.c @@ -126,7 +126,6 @@ void BarSettingsRead (BarSettings_t *settings) { #endif #endif settings->autoselect = true; - settings->forceTls = false; settings->history = 5; settings->volume = 0; settings->sortOrder = BAR_SORT_NAME_AZ; @@ -274,8 +273,6 @@ void BarSettingsRead (BarSettings_t *settings) { settings->fifo = strdup (val); } else if (streq ("autoselect", key)) { settings->autoselect = atoi (val); - } else if (streq ("force_tls", key)) { - settings->forceTls = atoi (val); } else if (streq ("tls_fingerprint", key)) { /* expects 40 byte hex-encoded sha1 */ if (strlen (val) == 40) { diff --git a/src/settings.h b/src/settings.h index ff19882..0624289 100644 --- a/src/settings.h +++ b/src/settings.h @@ -81,7 +81,6 @@ typedef struct { typedef struct { bool autoselect; - bool forceTls; unsigned int history; int volume; BarStationSorting_t sortOrder; diff --git a/src/ui.c b/src/ui.c index 7728a3f..3f23a23 100644 --- a/src/ui.c +++ b/src/ui.c @@ -134,15 +134,14 @@ void BarUiMsg (const BarSettings_t *settings, const BarUiMsg_t type, /* fetch http resource (post request) * @param waitress handle * @param piano request (initialized by PianoRequest()) - * @param ignore libpiano TLS hint and use it always */ static WaitressReturn_t BarPianoHttpRequest (WaitressHandle_t *waith, - PianoRequest_t *req, bool forceTls) { + PianoRequest_t *req) { waith->extraHeaders = "Content-Type: text/plain\r\n"; waith->postData = req->postData; waith->method = WAITRESS_METHOD_POST; waith->url.path = req->urlPath; - waith->url.tls = req->secure || forceTls; + waith->url.tls = req->secure; return WaitressFetchBuf (waith, &req->responseData); } @@ -173,7 +172,7 @@ int BarUiPianoCall (BarApp_t * const app, PianoRequestType_t type, return 0; } - *wRet = BarPianoHttpRequest (&app->waith, &req, app->settings.forceTls); + *wRet = BarPianoHttpRequest (&app->waith, &req); if (*wRet != WAITRESS_RET_OK) { BarUiMsg (&app->settings, MSG_NONE, "Network error: %s\n", WaitressErrorToStr (*wRet)); if (req.responseData != NULL) { -- cgit v1.2.3