]> git.saurik.com Git - redis.git/commitdiff
Allow port to be 0 in configuration, in order to allow disabling of TCP.
authorPaul Gideon Dann <pdgiddie@gmail.com>
Tue, 22 Feb 2011 10:49:17 +0000 (10:49 +0000)
committerantirez <antirez@gmail.com>
Tue, 22 Feb 2011 11:13:29 +0000 (12:13 +0100)
src/config.c

index 632a739890c2992c86f9342fd681fd987ed4680e..e0bf1574a8309b4581d615f8053d4d34d18484ca 100644 (file)
@@ -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) {