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
e927a246
Commit
e927a246
authored
May 16, 2011
by
antirez
Browse files
Fix for wrong error level detection in redis.log()
parent
288f811f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
e927a246
...
@@ -209,11 +209,11 @@ int luaLogCommand(lua_State *lua) {
...
@@ -209,11 +209,11 @@ int luaLogCommand(lua_State *lua) {
luaPushError
(
lua
,
"redis.log() requires two arguments or more."
);
luaPushError
(
lua
,
"redis.log() requires two arguments or more."
);
return
1
;
return
1
;
}
else
if
(
!
lua_isnumber
(
lua
,
-
argc
))
{
}
else
if
(
!
lua_isnumber
(
lua
,
-
argc
))
{
luaPushError
(
lua
,
"First argument must be a number."
);
luaPushError
(
lua
,
"First argument must be a number
(log level)
."
);
return
1
;
return
1
;
}
}
level
=
lua_tonumber
(
lua
,
-
argc
);
level
=
lua_tonumber
(
lua
,
-
argc
);
if
(
level
<
REDIS_DEBUG
&&
level
>
REDIS_WARNING
)
{
if
(
level
<
REDIS_DEBUG
||
level
>
REDIS_WARNING
)
{
luaPushError
(
lua
,
"Invalid debug level."
);
luaPushError
(
lua
,
"Invalid debug level."
);
return
1
;
return
1
;
}
}
...
...
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