From 415d14fbe90f73e92d82de17a884acac417dd843 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sun, 20 Apr 2014 18:06:00 +0200 Subject: [PATCH] miniupnpd/options.c: Add https_port= option also add http_port= as a synonym to port= --- miniupnpd/miniupnpd.c | 5 +++++ miniupnpd/options.c | 7 +++++-- miniupnpd/options.h | 7 +++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/miniupnpd/miniupnpd.c b/miniupnpd/miniupnpd.c index 69f18f9..e944754 100644 --- a/miniupnpd/miniupnpd.c +++ b/miniupnpd/miniupnpd.c @@ -881,6 +881,11 @@ init(int argc, char * * argv, struct runtime_vars * v) case UPNPPORT: v->port = atoi(ary_options[i].value); break; +#ifdef ENABLE_HTTPS + case UPNPHTTPSPORT: + v->https_port = atoi(ary_options[i].value); + break; +#endif case UPNPBITRATE_UP: upstream_bitrate = strtoul(ary_options[i].value, 0, 0); break; diff --git a/miniupnpd/options.c b/miniupnpd/options.c index 8d0de20..489cc7b 100644 --- a/miniupnpd/options.c +++ b/miniupnpd/options.c @@ -2,7 +2,7 @@ /* MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * author: Ryan Wagoner - * (c) 2006-2013 Thomas Bernard + * (c) 2006-2014 Thomas Bernard * This software is subject to the conditions detailed * in the LICENCE file provided within the distribution */ @@ -32,6 +32,10 @@ static const struct { { UPNPEXT_IP, "ext_ip" }, { UPNPLISTENING_IP, "listening_ip" }, { UPNPPORT, "port" }, + { UPNPPORT, "http_port" }, /* "port" and "http_port" are synonims */ +#ifdef ENABLE_HTTPS + { UPNPHTTPSPORT, "https_port" }, +#endif /* ENABLE_HTTPS */ { UPNPBITRATE_UP, "bitrate_up" }, { UPNPBITRATE_DOWN, "bitrate_down" }, { UPNPPRESENTATIONURL, "presentation_url" }, @@ -307,4 +311,3 @@ freeoptions(void) } #endif /* DISABLE_CONFIG_FILE */ - diff --git a/miniupnpd/options.h b/miniupnpd/options.h index 1237e04..de649f7 100644 --- a/miniupnpd/options.h +++ b/miniupnpd/options.h @@ -2,7 +2,7 @@ /* MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * author: Ryan Wagoner - * (c) 2006-2013 Thomas Bernard + * (c) 2006-2014 Thomas Bernard * This software is subject to the conditions detailed * in the LICENCE file provided within the distribution */ @@ -18,7 +18,10 @@ enum upnpconfigoptions { UPNPEXT_IFNAME = 1, /* ext_ifname */ UPNPEXT_IP, /* ext_ip */ UPNPLISTENING_IP, /* listening_ip */ - UPNPPORT, /* "port" */ + UPNPPORT, /* "port" / "http_port" */ +#ifdef ENABLE_HTTPS + UPNPHTTPSPORT, /* "https_port" */ +#endif UPNPBITRATE_UP, /* "bitrate_up" */ UPNPBITRATE_DOWN, /* "bitrate_down" */ UPNPPRESENTATIONURL, /* presentation_url */