about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2011-01-18 22:45:01 +0100
committerAlexander Barton <alex@barton.de>2011-01-18 22:45:01 +0100
commit8927700b221ba3cffbde50005319868efbdb1f3e (patch)
treed5abb952754aaf824a8b47d5516eeb8a4223cd68 /src
parent58a4dae56dd34e41b32dd3e5cede03a7ea5c7bb5 (diff)
downloadngircd-8927700b221ba3cffbde50005319868efbdb1f3e.tar.gz
ngircd-8927700b221ba3cffbde50005319868efbdb1f3e.zip
Allow "Port = 0" in [Server] blocks
Port number 0 marks remote servers that try to connect to this
daemon, but where this daemon never tries to establis a connection
on its own: only incoming connections are allowed.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/conf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index e1fb73be..db91a578 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -1361,11 +1361,12 @@ Handle_SERVER( int Line, char *Var, char *Arg )
 	if( strcasecmp( Var, "Port" ) == 0 ) {
 		/* Port to which this server should connect */
 		port = atol( Arg );
-		if( port > 0 && port < 0xFFFF )
+		if (port >= 0 && port < 0xFFFF)
 			New_Server.port = (UINT16)port;
 		else
-			Config_Error( LOG_ERR, "%s, line %d (section \"Server\"): Illegal port number %ld!",
-										NGIRCd_ConfFile, Line, port );
+			Config_Error(LOG_ERR,
+				"%s, line %d (section \"Server\"): Illegal port number %ld!",
+				NGIRCd_ConfFile, Line, port );
 		return;
 	}
 #ifdef SSL_SUPPORT