diff options
author | dormando <dormando@rydia.net> | 2023-03-04 21:44:24 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2023-03-26 16:48:37 -0700 |
commit | e0fa1fe46aeb9e405cb58234f6016b2c48a10777 (patch) | |
tree | decf57c8e0a321c6e4094391b32e2d7bfbbfddc4 /proto_proxy.c | |
parent | 923df263b5e34449acee2ce24906653c7d8808e1 (diff) | |
download | memcached-e0fa1fe46aeb9e405cb58234f6016b2c48a10777.tar.gz |
proxy: restrict functions for lua config vs route
Also changes the way the global context and thread contexts are fetched
from lua; via the VM extra space instead of upvalues, which is a little
faster and more universal.
It was always erroneous to run a lot of the config functions from routes
and vice versa, but there was no consistent strictness so users could
get into trouble.
Diffstat (limited to 'proto_proxy.c')
-rw-r--r-- | proto_proxy.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/proto_proxy.c b/proto_proxy.c index 3bcaf9c..952c897 100644 --- a/proto_proxy.c +++ b/proto_proxy.c @@ -166,6 +166,7 @@ void proxy_thread_init(void *ctx, LIBEVENT_THREAD *thr) { fprintf(stderr, "Failed to allocate proxy thread stats\n"); exit(EXIT_FAILURE); } + thr->proxy_ctx = ctx; // Initialize the lua state. lua_State *L = luaL_newstate(); |