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
f3e81de1
Commit
f3e81de1
authored
May 23, 2016
by
oranagra
Browse files
fix georadius returns multiple replies
parent
b09a6b6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/geo.c
View file @
f3e81de1
...
...
@@ -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
;
}
...
...
@@ -465,7 +469,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