Mercurial > noffle
changeset 406:44ffdb180788 noffle
[svn] fixed port range
author | godisch |
---|---|
date | Thu, 05 Jun 2003 18:55:44 +0100 |
parents | 450c90f52bcd |
children | efa9375e4314 |
files | ChangeLog src/client.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Jun 05 18:33:42 2003 +0100 +++ b/ChangeLog Thu Jun 05 18:55:44 2003 +0100 @@ -1,3 +1,8 @@ +Thu Jun 05 2003 Martin Godisch <martin@godisch.de> + +* src/client.c: Fixed port range to make ports > 255 available and check + for invalid ports < 0 and > 65535 functional. + Fri May 23 2003 Jim Hague <jim.hague@acm.org> * docs/noffle.1,src/configure.h,src/configfile.c,src/noffle.c: Add optional
--- a/src/client.c Thu Jun 05 18:33:42 2003 +0100 +++ b/src/client.c Thu Jun 05 18:55:44 2003 +0100 @@ -1,7 +1,7 @@ /* client.c - $Id: client.c 528 2003-05-22 08:23:33Z bears $ + $Id: client.c 548 2003-06-05 17:55:44Z godisch $ */ #if HAVE_CONFIG_H @@ -261,7 +261,7 @@ Bool Client_connect( const char *serv ) { - unsigned short int port; + long port; int sock, i; unsigned int stat; struct hostent *hp; @@ -284,7 +284,7 @@ { *pColon = '\0'; Utl_cpyStr( host, pStart ); - if ( sscanf( pColon + 1, "%hu", &port ) != 1 ) + if ( sscanf( pColon + 1, "%li", &port ) != 1 ) { Log_err( "Syntax error in server name: '%s'", serv ); return FALSE;;