add check for port number > 65535 to fhostcmd also

This commit is contained in:
Radim Kolar 2009-09-16 18:48:44 +02:00
parent 3d7ee6de48
commit ae72ec7740
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ Version NEXT
source port was reused or not. Old code did that but not over
server restarts.
INFO file updated with fresh information
fsetupcmd - reject port number > 65535
fsetupcmd and fhostcmd now reject port number > 65535
fsetupcmd - code cleaned a bit. Error message is now
fsetup: No host given! instead of fhost:
fsetupcmd got -l option. It lists all known fsp servers collected

View File

@ -152,7 +152,7 @@ int main (int argc, char ** argv)
if (!isdigit(*p) && *p!='.') setup->hostname=argv[optind];
if (!setup->hostname) setup->hostaddr=argv[optind];
setup->port=atol(argv[optind+1]);
if(setup->port==0)
if(setup->port==0 || setup->port > 65535)
setup=init_host();
if (argc > optind + 1) setup->dir=argv[optind+2]; /* directory given, too */
} else if (argc > optind) { /* abbreviation given */