]> granicus.if.org Git - apache/commitdiff
get the socket with ap_get_module_config instead of walking the filter chain
authorStefan Fritsch <sf@apache.org>
Mon, 15 Mar 2010 20:46:26 +0000 (20:46 +0000)
committerStefan Fritsch <sf@apache.org>
Mon, 15 Mar 2010 20:46:26 +0000 (20:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@923429 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_reqtimeout.c

index 0b7e3375c591497d2c664ce3f2cdb4a7d42bec14..5048348238f159df0823a532d481b0499974a6c8 100644 (file)
@@ -151,21 +151,7 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
     }
 
     if (!ccfg->socket) {
-        core_net_rec *net_rec;
-        ap_filter_t *core_in = f->next;
-
-        while (core_in && core_in->frec != ap_core_input_filter_handle)
-            core_in = core_in->next;
-
-        if (!core_in) {
-            ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, f->c,
-                          "mod_reqtimeout: Can't get socket "
-                          "handle from core_input_filter");
-            ap_remove_input_filter(f);
-            return ap_get_brigade(f->next, bb, mode, block, readbytes);
-        }
-        net_rec = core_in->ctx;
-        ccfg->socket = net_rec->client_socket;
+        ccfg->socket = ap_get_module_config(f->c->conn_config, &core_module);
     }
 
     rv = check_time_left(ccfg, &time_left);