mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Give an error message if you specify redirect twice
This commit is contained in:
parent
d63a435362
commit
c1b5220ee7
@ -2233,6 +2233,13 @@ NULL
|
|||||||
|
|
||||||
if (!strcasecmp(c->argv[j]->ptr,"redirect") && moreargs) {
|
if (!strcasecmp(c->argv[j]->ptr,"redirect") && moreargs) {
|
||||||
j++;
|
j++;
|
||||||
|
if (redir != 0) {
|
||||||
|
addReplyError(c,"A client can only redirect to a single "
|
||||||
|
"other client");
|
||||||
|
zfree(prefix);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (getLongLongFromObjectOrReply(c,c->argv[j],&redir,NULL) !=
|
if (getLongLongFromObjectOrReply(c,c->argv[j],&redir,NULL) !=
|
||||||
C_OK)
|
C_OK)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user