Give an error message if you specify redirect twice

This commit is contained in:
Madelyn Olson 2020-02-16 05:41:39 -08:00
parent d63a435362
commit c1b5220ee7

View File

@ -2233,6 +2233,13 @@ NULL
if (!strcasecmp(c->argv[j]->ptr,"redirect") && moreargs) {
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) !=
C_OK)
{