changeset 1012:cafdcbcb5e79

Allow port value 0 in the configuration to disable a server
author Sebastien Decugis <sdecugis@freediameter.net>
date Thu, 28 Mar 2013 11:20:50 +0800
parents aaf8743df5e7
children 7b5c46505e09 8af24e6143ce
files libfdcore/fdd.y
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libfdcore/fdd.y	Tue Mar 26 14:30:29 2013 +0100
+++ b/libfdcore/fdd.y	Thu Mar 28 11:20:50 2013 +0800
@@ -191,7 +191,7 @@
 
 port:			PORT '=' INTEGER ';'
 			{
-				CHECK_PARAMS_DO( ($3 > 0) && ($3 < 1<<16),
+				CHECK_PARAMS_DO( ($3 >= 0) && ($3 < 1<<16),
 					{ yyerror (&yylloc, conf, "Invalid value"); YYERROR; } );
 				conf->cnf_port = (uint16_t)$3;
 			}
@@ -199,7 +199,7 @@
 
 secport:		SECPORT '=' INTEGER ';'
 			{
-				CHECK_PARAMS_DO( ($3 > 0) && ($3 < 1<<16),
+				CHECK_PARAMS_DO( ($3 >= 0) && ($3 < 1<<16),
 					{ yyerror (&yylloc, conf, "Invalid value"); YYERROR; } );
 				conf->cnf_port_tls = (uint16_t)$3;
 			}
"Welcome to our mercurial repository"