miniupnpd: Add -z command line option to change friendly name (thanks to Shawn Fisher)
see 896425597e
This commit is contained in:
parent
d9f265d0cc
commit
6451a6906d
|
@ -1,4 +1,7 @@
|
||||||
$Id: Changelog.txt,v 1.292 2012/06/29 19:26:07 nanard Exp $
|
$Id: Changelog.txt,v 1.294 2012/07/14 15:12:50 nanard Exp $
|
||||||
|
|
||||||
|
2012/07/14:
|
||||||
|
Add -z command line option to change friendly name (thanks to Shawn Fisher)
|
||||||
|
|
||||||
2012/06/29:
|
2012/06/29:
|
||||||
added DISABLE_CONFIG_FILE in options.h to disable miniupnpd.conf parsing
|
added DISABLE_CONFIG_FILE in options.h to disable miniupnpd.conf parsing
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: miniupnpd.c,v 1.164 2012/06/29 19:33:37 nanard Exp $ */
|
/* $Id: miniupnpd.c,v 1.166 2012/07/14 15:12:51 nanard Exp $ */
|
||||||
/* MiniUPnP project
|
/* MiniUPnP project
|
||||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||||
* (c) 2006-2012 Thomas Bernard
|
* (c) 2006-2012 Thomas Bernard
|
||||||
|
@ -864,6 +864,13 @@ init(int argc, char * * argv, struct runtime_vars * v)
|
||||||
else
|
else
|
||||||
fprintf(stderr, "Option -%c takes one argument.\n", argv[i][1]);
|
fprintf(stderr, "Option -%c takes one argument.\n", argv[i][1]);
|
||||||
break;
|
break;
|
||||||
|
case 'z':
|
||||||
|
if(i+1 < argc)
|
||||||
|
strncpy(friendly_name, argv[++i], FRIENDLY_NAME_MAX_LEN);
|
||||||
|
else
|
||||||
|
fprintf(stderr, "Option -%c takes one argument.\n", argv[i][1]);
|
||||||
|
friendly_name[FRIENDLY_NAME_MAX_LEN-1] = '\0';
|
||||||
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
if(i+1 < argc)
|
if(i+1 < argc)
|
||||||
strncpy(serialnumber, argv[++i], SERIALNUMBER_MAX_LEN);
|
strncpy(serialnumber, argv[++i], SERIALNUMBER_MAX_LEN);
|
||||||
|
@ -1174,7 +1181,7 @@ print_usage:
|
||||||
"\n"
|
"\n"
|
||||||
/*"[-l logfile] " not functionnal */
|
/*"[-l logfile] " not functionnal */
|
||||||
"\t\t[-u uuid] [-s serial] [-m model_number] \n"
|
"\t\t[-u uuid] [-s serial] [-m model_number] \n"
|
||||||
"\t\t[-t notify_interval] [-P pid_filename]\n"
|
"\t\t[-t notify_interval] [-P pid_filename] [-z fiendly_name]\n"
|
||||||
"\t\t[-B down up] [-w url] [-r clean_ruleset_interval]\n"
|
"\t\t[-B down up] [-w url] [-r clean_ruleset_interval]\n"
|
||||||
#ifdef USE_PF
|
#ifdef USE_PF
|
||||||
"\t\t[-q queue] [-T tag]\n"
|
"\t\t[-q queue] [-T tag]\n"
|
||||||
|
|
Loading…
Reference in New Issue