mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
GEOSEARCH: change 'FROMLOC' to 'FROMLONLAT' (#8190)
And formats style a tiniee-winiee bit
This commit is contained in:
10
src/geo.c
10
src/geo.c
@@ -591,7 +591,7 @@ void georadiusGeneric(client *c, int srcKeyIndex, int flags) {
|
||||
}
|
||||
frommember = 1;
|
||||
i++;
|
||||
} else if (!strcasecmp(arg, "fromloc") &&
|
||||
} else if (!strcasecmp(arg, "fromlonlat") &&
|
||||
(i+2) < remaining &&
|
||||
flags & GEOSEARCH &&
|
||||
!frommember)
|
||||
@@ -635,12 +635,16 @@ void georadiusGeneric(client *c, int srcKeyIndex, int flags) {
|
||||
}
|
||||
|
||||
if ((flags & GEOSEARCH) && !(frommember || fromloc)) {
|
||||
addReplyErrorFormat(c, "exactly one of FROMMEMBER or FROMLOC can be specified for %s", (char *)c->argv[0]->ptr);
|
||||
addReplyErrorFormat(c,
|
||||
"exactly one of FROMMEMBER or FROMLONLAT can be specified for %s",
|
||||
(char *)c->argv[0]->ptr);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((flags & GEOSEARCH) && !(byradius || bybox)) {
|
||||
addReplyErrorFormat(c, "exactly one of BYRADIUS and BYBOX can be specified for %s", (char *)c->argv[0]->ptr);
|
||||
addReplyErrorFormat(c,
|
||||
"exactly one of BYRADIUS and BYBOX can be specified for %s",
|
||||
(char *)c->argv[0]->ptr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user