Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
85dd2f3a
Commit
85dd2f3a
authored
Apr 27, 2009
by
antirez
Browse files
log file parsing code improved a bit
parent
be2bb6b0
Changes
2
Show whitespace changes
Inline
Side-by-side
TODO
View file @
85dd2f3a
...
@@ -2,7 +2,6 @@ BEFORE REDIS 1.0.0-rc1
...
@@ -2,7 +2,6 @@ BEFORE REDIS 1.0.0-rc1
- What happens if the saving child gets killed instead to end normally? Handle this.
- What happens if the saving child gets killed instead to end normally? Handle this.
- Make sinterstore / unionstore / sdiffstore returning the cardinality of the resulting set.
- Make sinterstore / unionstore / sdiffstore returning the cardinality of the resulting set.
- Add a new field as INFO output: bgsaveinprogress
- Remove max number of args limit
- Remove max number of args limit
- GETSET
- GETSET
- network layer stresser in test in demo, make sure to set/get random streams of data and check that what we read back is byte-by-byte the same.
- network layer stresser in test in demo, make sure to set/get random streams of data and check that what we read back is byte-by-byte the same.
...
...
redis.c
View file @
85dd2f3a
...
@@ -887,6 +887,12 @@ static long long emptyDb() {
...
@@ -887,6 +887,12 @@ static long long emptyDb() {
return
removed
;
return
removed
;
}
}
static
int
yesnotoi
(
char
*
s
)
{
if
(
!
strcasecmp
(
s
,
"yes"
))
return
1
;
else
if
(
!
strcasecmp
(
s
,
"no"
))
return
0
;
else
return
-
1
;
}
/* I agree, this is a very rudimental way to load a configuration...
/* I agree, this is a very rudimental way to load a configuration...
will improve later if the config gets more complex */
will improve later if the config gets more complex */
static
void
loadServerConfig
(
char
*
filename
)
{
static
void
loadServerConfig
(
char
*
filename
)
{
...
@@ -980,24 +986,15 @@ static void loadServerConfig(char *filename) {
...
@@ -980,24 +986,15 @@ static void loadServerConfig(char *filename) {
server
.
masterport
=
atoi
(
argv
[
2
]);
server
.
masterport
=
atoi
(
argv
[
2
]);
server
.
replstate
=
REDIS_REPL_CONNECT
;
server
.
replstate
=
REDIS_REPL_CONNECT
;
}
else
if
(
!
strcmp
(
argv
[
0
],
"glueoutputbuf"
)
&&
argc
==
2
)
{
}
else
if
(
!
strcmp
(
argv
[
0
],
"glueoutputbuf"
)
&&
argc
==
2
)
{
sdstolower
(
argv
[
1
]);
if
((
server
.
glueoutputbuf
=
yesnotoi
(
argv
[
1
]))
==
-
1
)
{
if
(
!
strcmp
(
argv
[
1
],
"yes"
))
server
.
glueoutputbuf
=
1
;
else
if
(
!
strcmp
(
argv
[
1
],
"no"
))
server
.
glueoutputbuf
=
0
;
else
{
err
=
"argument must be 'yes' or 'no'"
;
goto
loaderr
;
err
=
"argument must be 'yes' or 'no'"
;
goto
loaderr
;
}
}
}
else
if
(
!
strcmp
(
argv
[
0
],
"shareobjects"
)
&&
argc
==
2
)
{
}
else
if
(
!
strcmp
(
argv
[
0
],
"shareobjects"
)
&&
argc
==
2
)
{
sdstolower
(
argv
[
1
]);
if
((
server
.
shareobjects
=
yesnotoi
(
argv
[
1
]))
==
-
1
)
{
if
(
!
strcmp
(
argv
[
1
],
"yes"
))
server
.
shareobjects
=
1
;
else
if
(
!
strcmp
(
argv
[
1
],
"no"
))
server
.
shareobjects
=
0
;
else
{
err
=
"argument must be 'yes' or 'no'"
;
goto
loaderr
;
err
=
"argument must be 'yes' or 'no'"
;
goto
loaderr
;
}
}
}
else
if
(
!
strcmp
(
argv
[
0
],
"daemonize"
)
&&
argc
==
2
)
{
}
else
if
(
!
strcmp
(
argv
[
0
],
"daemonize"
)
&&
argc
==
2
)
{
sdstolower
(
argv
[
1
]);
if
((
server
.
daemonize
=
yesnotoi
(
argv
[
1
]))
==
-
1
)
{
if
(
!
strcmp
(
argv
[
1
],
"yes"
))
server
.
daemonize
=
1
;
else
if
(
!
strcmp
(
argv
[
1
],
"no"
))
server
.
daemonize
=
0
;
else
{
err
=
"argument must be 'yes' or 'no'"
;
goto
loaderr
;
err
=
"argument must be 'yes' or 'no'"
;
goto
loaderr
;
}
}
}
else
if
(
!
strcmp
(
argv
[
0
],
"requirepass"
)
&&
argc
==
2
)
{
}
else
if
(
!
strcmp
(
argv
[
0
],
"requirepass"
)
&&
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