From 99f584cff0ad5ad41db147b85822c51489eced8a Mon Sep 17 00:00:00 2001 From: colinlbc Date: Wed, 24 Oct 2012 03:03:13 -0700 Subject: [PATCH] use char *remote_addr instead of wsgi_req->remote_addr --- plugins/router_access/router_access.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/router_access/router_access.c b/plugins/router_access/router_access.c index eecfd632..073a9f2e 100644 --- a/plugins/router_access/router_access.c +++ b/plugins/router_access/router_access.c @@ -27,12 +27,10 @@ int uwsgi_routing_func_access(struct wsgi_request *wsgi_req, struct uwsgi_route if (!strcmp(action, "access:hosts")){ // syntax access:hosts to use hosts.allow, hosts.deny - char *host = uwsgi_concat2n(wsgi_req->host, wsgi_req->host_len, "", 0); char *remote_addr = uwsgi_concat2n(wsgi_req->remote_addr, wsgi_req->remote_addr_len, "", 0); - pass = hosts_ctl("uwsgi", STRING_UNKNOWN, wsgi_req->remote_addr, STRING_UNKNOWN); + pass = hosts_ctl("uwsgi", STRING_UNKNOWN, remote_addr, STRING_UNKNOWN); - free(host); free(remote_addr); }