ACL: use a fixed table for command IDs.

This commit is contained in:
antirez
2019-01-09 21:31:29 +01:00
parent 010b24f864
commit 7fc882c578
3 changed files with 27 additions and 2 deletions

View File

@ -2224,8 +2224,7 @@ void populateCommandTable(void) {
f++;
}
c->id = j; /* Sequential ID for each command. Used for ACLs. */
c->id = ACLGetCommandID(c->name); /* Assign the ID used for ACL. */
retval1 = dictAdd(server.commands, sdsnew(c->name), c);
/* Populate an additional dictionary that will be unaffected
* by rename-command statements in redis.conf. */