| 1753 | } |
| 1754 | |
| 1755 | void evalShaCommand(client *c) { |
| 1756 | /* Explicitly feed monitor here so that lua commands appear after their |
| 1757 | * script command. */ |
| 1758 | replicationFeedMonitors(c,g_pserver->monitors,c->db->id,c->argv,c->argc); |
| 1759 | if (sdslen((sds)ptrFromObj(c->argv[1])) != 40) { |
| 1760 | /* We know that a match is not possible if the provided SHA is |
| 1761 | * not the right length. So we return an error ASAP, this way |
| 1762 | * evalGenericCommand() can be implemented without string length |
| 1763 | * sanity check */ |
| 1764 | addReplyErrorObject(c, shared.noscripterr); |
| 1765 | return; |
| 1766 | } |
| 1767 | if (!(c->flags & CLIENT_LUA_DEBUG)) |
| 1768 | evalGenericCommand(c,1); |
| 1769 | else { |
| 1770 | addReplyError(c,"Please use EVAL instead of EVALSHA for debugging"); |
| 1771 | return; |
| 1772 | } |
| 1773 | } |
| 1774 | |
| 1775 | void scriptCommand(client *c) { |
| 1776 | if (c->argc == 2 && !strcasecmp((const char*)ptrFromObj(c->argv[1]),"help")) { |
nothing calls this directly
no test coverage detected