| 1509 | } |
| 1510 | |
| 1511 | void prepareLuaClient(void) { |
| 1512 | /* Select the right DB in the context of the Lua client */ |
| 1513 | selectDb(serverTL->lua_client,g_pserver->lua_caller->db->id); |
| 1514 | serverTL->lua_client->resp = 2; /* Default is RESP2, scripts can change it. */ |
| 1515 | |
| 1516 | /* If we are in MULTI context, flag Lua client as CLIENT_MULTI. */ |
| 1517 | if (g_pserver->lua_caller->flags & CLIENT_MULTI) { |
| 1518 | serverTL->lua_client->flags |= CLIENT_MULTI; |
| 1519 | } |
| 1520 | } |
| 1521 | |
| 1522 | void resetLuaClient(void) { |
| 1523 | /* After the script done, remove the MULTI state. */ |
no test coverage detected