From: Paul Gideon Dann Date: Tue, 22 Feb 2011 10:49:17 +0000 (+0000) Subject: Allow port to be 0 in configuration, in order to allow disabling of TCP. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/df50d707f3a361327e55dce83fb342dc08390c69?ds=sidebyside Allow port to be 0 in configuration, in order to allow disabling of TCP. --- diff --git a/src/config.c b/src/config.c index 632a7398..e0bf1574 100644 --- a/src/config.c +++ b/src/config.c @@ -66,7 +66,7 @@ void loadServerConfig(char *filename) { } } else if (!strcasecmp(argv[0],"port") && argc == 2) { server.port = atoi(argv[1]); - if (server.port < 1 || server.port > 65535) { + if (server.port < 0 || server.port > 65535) { err = "Invalid port"; goto loaderr; } } else if (!strcasecmp(argv[0],"bind") && argc == 2) {