Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
df50d707
Commit
df50d707
authored
Feb 22, 2011
by
Paul Gideon Dann
Committed by
antirez
Feb 22, 2011
Browse files
Allow port to be 0 in configuration, in order to allow disabling of TCP.
parent
29920dce
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
df50d707
...
@@ -66,7 +66,7 @@ void loadServerConfig(char *filename) {
...
@@ -66,7 +66,7 @@ void loadServerConfig(char *filename) {
}
}
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"port"
)
&&
argc
==
2
)
{
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"port"
)
&&
argc
==
2
)
{
server
.
port
=
atoi
(
argv
[
1
]);
server
.
port
=
atoi
(
argv
[
1
]);
if
(
server
.
port
<
1
||
server
.
port
>
65535
)
{
if
(
server
.
port
<
0
||
server
.
port
>
65535
)
{
err
=
"Invalid port"
;
goto
loaderr
;
err
=
"Invalid port"
;
goto
loaderr
;
}
}
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"bind"
)
&&
argc
==
2
)
{
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"bind"
)
&&
argc
==
2
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment