summaryrefslogtreecommitdiff
path: root/src/libwaitress/waitress.c
diff options
context:
space:
mode:
authorPierre Zurek <pierrezurek@gmail.com>2012-11-02 13:58:39 +0100
committerLars-Dominik Braun <lars@6xq.net>2012-11-04 12:21:33 +0100
commitcdb3ba3b567099236ebc1998b84ec0d7035d8cc8 (patch)
tree96b6c20d6d7c063b580dd4c75ac3fd1992b05094 /src/libwaitress/waitress.c
parentdd6c620b53272e2eb4b091a835cd250309f04cad (diff)
downloadpianobar-cdb3ba3b567099236ebc1998b84ec0d7035d8cc8.tar.gz
pianobar-cdb3ba3b567099236ebc1998b84ec0d7035d8cc8.tar.bz2
pianobar-cdb3ba3b567099236ebc1998b84ec0d7035d8cc8.zip
New setting: Read RPC TLS port
Useful for tuner-beta.savagebeast.com:8443. Closes #319.
Diffstat (limited to 'src/libwaitress/waitress.c')
-rw-r--r--src/libwaitress/waitress.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libwaitress/waitress.c b/src/libwaitress/waitress.c
index ee2926b..ce2a254 100644
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
@@ -577,7 +577,11 @@ static bool WaitressFormatAuthorization (WaitressHandle_t *waith,
static const char *WaitressDefaultPort (const WaitressUrl_t * const url) {
assert (url != NULL);
- return url->port == NULL ? (url->tls ? "443" : "80") : url->port;
+ if (url->tls) {
+ return url->tlsPort == NULL ? "443" : url->tlsPort;
+ } else {
+ return url->port == NULL ? "80" : url->port;
+ }
}
/* get line from string