diff options
author | dormando <dormando@rydia.net> | 2022-04-06 16:59:18 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2022-04-08 13:19:26 -0700 |
commit | 43a5d6832bce062587c9c088797f0eec46c1ded8 (patch) | |
tree | dc38f8278bb90a63a0d00e9fdb7da139565b97dd /proxy_await.c | |
parent | 88e7960d21865d48f68b2463515dedde66cd9ae8 (diff) | |
download | memcached-43a5d6832bce062587c9c088797f0eec46c1ded8.tar.gz |
proxy: replace proxycmds stream with proxyreqs
delete the magic logging and require mcp.log_req* be used if you want
those types of entries to appear. keeps a separate data stream from
"proxyuser" just in case that's useful.
proxycmds wasn't able to get enough context to autogenerate useful log
lines, so I'd rather not have it in there at all.
Diffstat (limited to 'proxy_await.c')
-rw-r--r-- | proxy_await.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/proxy_await.c b/proxy_await.c index 60cd004..ada4d31 100644 --- a/proxy_await.c +++ b/proxy_await.c @@ -97,7 +97,6 @@ static void mcp_queue_await_io(conn *c, lua_State *Lc, mcp_request_t *rq, int aw // reserve one uservalue for a lua-supplied response. mcp_resp_t *r = lua_newuserdatauv(Lc, sizeof(mcp_resp_t), 1); memset(r, 0, sizeof(mcp_resp_t)); - r->start = rq->start; // Set noreply mode. // TODO (v2): the response "inherits" the request's noreply mode, which isn't // strictly correct; we should inherit based on the request that spawned @@ -120,15 +119,7 @@ static void mcp_queue_await_io(conn *c, lua_State *Lc, mcp_request_t *rq, int aw r->mode = RESP_MODE_NORMAL; } - int x; - int end = rq->pr.reqlen-2 > RESP_CMD_MAX ? RESP_CMD_MAX : rq->pr.reqlen-2; - for (x = 0; x < end; x++) { - if (rq->pr.request[x] == ' ') { - break; - } - r->cmd[x] = rq->pr.request[x]; - } - r->cmd[x] = '\0'; + r->cmd = rq->pr.command; luaL_getmetatable(Lc, "mcp.response"); lua_setmetatable(Lc, -2); |