]> granicus.if.org Git - libevent/commitdiff
dereference the right field and associate the right connection
authorNiels Provos <provos@gmail.com>
Mon, 31 Dec 2007 20:42:21 +0000 (20:42 +0000)
committerNiels Provos <provos@gmail.com>
Mon, 31 Dec 2007 20:42:21 +0000 (20:42 +0000)
svn:r624

evrpc.c

diff --git a/evrpc.c b/evrpc.c
index 3e8480dc393acc4b00fccb7dacdcdd32d524bdf8..acebd6207976b75de7e6ace035de6ac393a00b8f 100644 (file)
--- 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);
 }