From cdb3ba3b567099236ebc1998b84ec0d7035d8cc8 Mon Sep 17 00:00:00 2001 From: Pierre Zurek Date: Fri, 2 Nov 2012 13:58:39 +0100 Subject: New setting: Read RPC TLS port Useful for tuner-beta.savagebeast.com:8443. Closes #319. --- src/libwaitress/waitress.c | 6 +++++- src/libwaitress/waitress.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/libwaitress') 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 diff --git a/src/libwaitress/waitress.h b/src/libwaitress/waitress.h index f91985d..0d69f0e 100644 --- a/src/libwaitress/waitress.h +++ b/src/libwaitress/waitress.h @@ -55,6 +55,7 @@ typedef struct { const char *password; const char *host; const char *port; + const char *tlsPort; const char *path; /* without leading '/' */ } WaitressUrl_t; -- cgit v1.2.3