summaryrefslogtreecommitdiff
path: root/proxy_await.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2022-04-01 18:32:24 -0700
committerdormando <dormando@rydia.net>2022-04-08 13:19:26 -0700
commit88e7960d21865d48f68b2463515dedde66cd9ae8 (patch)
tree4d5383e44b87b446a761ff5744c44b6440401d3c /proxy_await.c
parent046c4bb5d8498420c13e5357c8299b60952b2595 (diff)
downloadmemcached-88e7960d21865d48f68b2463515dedde66cd9ae8.tar.gz
proxy: mcp.log_req* API interface
Lua level API for logging full context of a request/response. Provides log_req() for simple logging and log_reqsample() for conditional logging.
Diffstat (limited to 'proxy_await.c')
-rw-r--r--proxy_await.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/proxy_await.c b/proxy_await.c
index 8c277ea..60cd004 100644
--- a/proxy_await.c
+++ b/proxy_await.c
@@ -167,6 +167,10 @@ static void mcp_queue_await_io(conn *c, lua_State *Lc, mcp_request_t *rq, int aw
// The direct backend object. await object is holding reference
p->backend = be;
+ // See #887 for notes.
+ // TODO (v2): hopefully this can be optimized out.
+ strncpy(r->be_name, be->name, MAX_NAMELEN+1);
+ strncpy(r->be_port, be->port, MAX_PORTLEN+1);
mcp_request_attach(Lc, rq, p);