miniupnpd/options.c: Add https_port= option

also add http_port= as a synonym to port=
This commit is contained in:
Thomas Bernard 2014-04-20 18:06:00 +02:00
parent 7f85648277
commit 415d14fbe9
3 changed files with 15 additions and 4 deletions

View File

@ -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;

View File

@ -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 */

View File

@ -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 */