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
14e04847
Commit
14e04847
authored
May 23, 2016
by
oranagra
Committed by
antirez
Jun 16, 2016
Browse files
fix georadius returns multiple replies
parent
bd23ea3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/geo.c
View file @
14e04847
...
...
@@ -156,9 +156,13 @@ double extractDistanceOrReply(client *c, robj **argv,
return
-
1
;
}
if
(
distance
<
0
)
{
addReplyError
(
c
,
"radius cannot be negative"
);
return
-
1
;
}
double
to_meters
=
extractUnitOrReply
(
c
,
argv
[
1
]);
if
(
to_meters
<
0
)
{
addReplyError
(
c
,
"radius cannot be negative"
);
return
-
1
;
}
...
...
@@ -467,7 +471,6 @@ void georadiusGeneric(client *c, int type) {
double
radius_meters
=
0
,
conversion
=
1
;
if
((
radius_meters
=
extractDistanceOrReply
(
c
,
c
->
argv
+
base_args
-
2
,
&
conversion
))
<
0
)
{
addReplyError
(
c
,
"radius must be >= 0"
);
return
;
}
...
...
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