summaryrefslogtreecommitdiff
path: root/proxy_config.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2022-08-17 10:49:49 -0700
committerdormando <dormando@rydia.net>2022-08-17 10:49:49 -0700
commit2004865efe1e8da24f7182b233246298ed5cf56e (patch)
treeef206c8fdb4014d08b12e3990a3aa1b7470e512f /proxy_config.c
parent14b72ad7ce64fd2adefb840db5aca3d28dded03f (diff)
downloadmemcached-2004865efe1e8da24f7182b233246298ed5cf56e.tar.gz
proxy: allow booleans in pool structure
the return value passed from mcp_config_pools() is adjusted and copied into the worker VM's so the types are limited. This adds the boolean type to allowable list.
Diffstat (limited to 'proxy_config.c')
-rw-r--r--proxy_config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/proxy_config.c b/proxy_config.c
index caddbff..3de1aac 100644
--- a/proxy_config.c
+++ b/proxy_config.c
@@ -279,6 +279,9 @@ static void _copy_config_table(lua_State *from, lua_State *to) {
case LUA_TSTRING:
lua_pushlstring(to, lua_tostring(from, -1), lua_rawlen(from, -1));
break;
+ case LUA_TBOOLEAN:
+ lua_pushboolean(to, lua_toboolean(from, -1));
+ break;
case LUA_TTABLE:
// TODO (v2): copy the metatable first?
// TODO (v2): size narr/nrec from old table and use createtable to