From: Niels Provos Date: Mon, 31 Dec 2007 20:42:21 +0000 (+0000) Subject: dereference the right field and associate the right connection X-Git-Tag: release-2.0.1-alpha~434 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=992bc85b96b3ca3eeff05e030468392894cc7195;p=libevent dereference the right field and associate the right connection svn:r624 --- diff --git a/evrpc.c b/evrpc.c index 3e8480dc..acebd620 100644 --- a/evrpc.c +++ b/evrpc.c @@ -825,7 +825,7 @@ evrpc_reply_done(struct evhttp_request *req, void *arg) } if (TAILQ_FIRST(&pool->input_hooks) != NULL) { - evrpc_hook_associate_meta(&ctx->hook_meta, req->evcon); + evrpc_hook_associate_meta(&ctx->hook_meta, ctx->evcon); /* apply hooks to the incoming request */ hook_res = evrpc_process_hooks(&pool->input_hooks, @@ -1020,6 +1020,6 @@ struct evhttp_connection * evrpc_hook_get_connection(void *ctx) { struct evrpc_request_wrapper *req = ctx; - - return (req->evcon); + assert(req->hook_meta != NULL); + return (req->hook_meta->evcon); }