| 1496 | } |
| 1497 | |
| 1498 | void prepareLuaClient(void) { |
| 1499 | /* Select the right DB in the context of the Lua client */ |
| 1500 | selectDb(server.lua_client,server.lua_caller->db->id); |
| 1501 | server.lua_client->resp = 2; /* Default is RESP2, scripts can change it. */ |
| 1502 | |
| 1503 | /* If we are in MULTI context, flag Lua client as CLIENT_MULTI. */ |
| 1504 | if (server.lua_caller->flags & CLIENT_MULTI) { |
| 1505 | server.lua_client->flags |= CLIENT_MULTI; |
| 1506 | } |
| 1507 | } |
| 1508 | |
| 1509 | void resetLuaClient(void) { |
| 1510 | /* After the script done, remove the MULTI state. */ |
no test coverage detected