use char *remote_addr instead of wsgi_req->remote_addr

This commit is contained in:
colinlbc
2012-10-24 03:03:13 -07:00
parent fc6a79dcc9
commit 99f584cff0
+1 -3
View File
@@ -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);
}