]> granicus.if.org Git - apache/commitdiff
Remove IOLs from Apache. They are no longer necessary, now that we have
authorRyan Bloom <rbb@apache.org>
Wed, 23 Aug 2000 00:01:58 +0000 (00:01 +0000)
committerRyan Bloom <rbb@apache.org>
Wed, 23 Aug 2000 00:01:58 +0000 (00:01 +0000)
filtering beginning to work.  There is a hack that has been repeated
through this patch, we morph a pipe into a socket, and put the socket
into the BUFF.  Everytime we do that, we are working with a pipe from
a CGI, and we should be creating a pipe bucket and passing that bucket
back.  Because we don't actually have pipe buckets yet, we are using this
hack.  When we get pipe buckets, this will be fixed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86136 13f79535-47bb-0310-9956-ffa450edef68

20 files changed:
include/ap_mpm.h
modules/filters/mod_include.c
modules/generators/mod_cgi.c
modules/generators/mod_cgid.c
modules/http/http_core.c
modules/http/http_protocol.c
modules/metadata/mod_mime_magic.c
modules/proxy/proxy_connect.c
modules/proxy/proxy_ftp.c
modules/proxy/proxy_http.c
server/Makefile.in
server/mpm/beos/beos.c
server/mpm/dexter/dexter.c
server/mpm/experimental/perchild/perchild.c
server/mpm/mpmt_beos/mpmt_beos.c
server/mpm/mpmt_pthread/mpmt_pthread.c
server/mpm/perchild/perchild.c
server/mpm/prefork/prefork.c
server/mpm/spmt_os2/spmt_os2.c
server/mpm/winnt/mpm_winnt.c

index 95a9d908de6b045f14109b137fb2abc5ddad9020..73c9de0147505a86942b130c1c4f00f795dd94f2 100644 (file)
@@ -98,7 +98,7 @@
     unix/posix notes:
     - The MPM does not set a SIGALRM handler, user code may use SIGALRM.
        But the preferred method of handling timeouts is to use the
-       timeouts provided by the BUFF/iol abstraction.
+       timeouts provided by the BUFF abstraction.
     - The proper setting for SIGPIPE is SIG_IGN, if user code changes it
         for any of their own processing, it must be restored to SIG_IGN
        prior to executing or returning to any apache code.
index cc81e785cdc2963e81ae2b34e6175f11672dd66e..eddedf1efe895f3cb611fd276461936b18051763 100644 (file)
@@ -836,7 +836,7 @@ static int include_cmd(char *s, request_rec *r)
     apr_table_t *env = r->subprocess_env;
     char **argv;
     apr_file_t *file = NULL;
-    ap_iol *iol;
+    apr_socket_t *sock = NULL;
 #if defined(RLIMIT_CPU)  || defined(RLIMIT_NPROC) || \
     defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined (RLIMIT_AS)
     core_dir_config *conf; 
@@ -908,11 +908,15 @@ static int include_cmd(char *s, request_rec *r)
             apr_note_subprocess(r->pool, procnew, kill_after_timeout);
             /* Fill in BUFF structure for parents pipe to child's stdout */
             file = procnew->out;
-            iol = ap_create_file_iol(file);
-            if (!iol)
+            if (!file)
                 return APR_EBADF;
+            /* XXX This is a hack.  The correct solution is to create a 
+             * pipe bucket, and just pass it down.  Since that bucket type
+             * hasn't been written, we can hack it for the moment.
+             */ 
+            apr_socket_from_file(&sock, file);
             script_in = ap_bcreate(r->pool, B_RD);
-            ap_bpush_iol(script_in, iol);
+            ap_bpush_socket(script_in, sock);
             ap_send_fb(script_in, r);
             ap_bclose(script_in);
         }
index c9a732c1d47dfd9a1b0c48298267b7f118c62742..9d435092710bbaa9cbb4a94599510cb3a33958a7 100644 (file)
@@ -309,7 +309,7 @@ static apr_status_t run_cgi_child(BUFF **script_out, BUFF **script_in, BUFF **sc
     apr_proc_t *procnew = apr_pcalloc(p, sizeof(*procnew));
     apr_status_t rc = APR_SUCCESS;
     apr_file_t *file = NULL;
-    ap_iol *iol;
+    apr_file_t *sock = NULL;
 #if defined(RLIMIT_CPU)  || defined(RLIMIT_NPROC) || \
     defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined (RLIMIT_AS)
     core_dir_config *conf;
@@ -379,29 +379,42 @@ static apr_status_t run_cgi_child(BUFF **script_out, BUFF **script_in, BUFF **sc
 
             /* Fill in BUFF structure for parents pipe to child's stdout */
             file = procnew->out;
-            iol = ap_create_file_iol(file);
-            if (!iol)
+            if (!file)
                 return APR_EBADF;
+            /* XXX This is a hack.  The correct solution is to create a
+             * pipe bucket, and just pass it down.  Since that bucket type
+             * hasn't been written, we can hack it for the moment.
+             */
+            apr_socket_from_file(&sock, file);
+
             *script_in = ap_bcreate(p, B_RD);
-            ap_bpush_iol(*script_in, iol);
+            ap_bpush_socket(*script_in, sock);
             ap_bsetopt(*script_in, BO_TIMEOUT, &r->server->timeout);
 
             /* Fill in BUFF structure for parents pipe to child's stdin */
             file = procnew->in;
-            iol = ap_create_file_iol(file);
-            if (!iol)
+            if (!file)
                 return APR_EBADF;
+            /* XXX This is a hack.  The correct solution is to create a
+             * pipe bucket, and just pass it down.  Since that bucket type
+             * hasn't been written, we can hack it for the moment.
+             */
+            apr_socket_from_file(&sock, file);
             *script_out = ap_bcreate(p, B_WR);
-            ap_bpush_iol(*script_out, iol);
+            ap_bpush_socket(*script_out, sock);
             ap_bsetopt(*script_out, BO_TIMEOUT, &r->server->timeout);
 
             /* Fill in BUFF structure for parents pipe to child's stderr */
             file = procnew->err;
-            iol = ap_create_file_iol(file);
-            if (!iol)
+            if (!file)
                 return APR_EBADF;
+            /* XXX This is a hack.  The correct solution is to create a
+             * pipe bucket, and just pass it down.  Since that bucket type
+             * hasn't been written, we can hack it for the moment.
+             */
+            apr_socket_from_file(&sock, file);
             *script_err = ap_bcreate(p, B_RD);
-            ap_bpush_iol(*script_err, iol);
+            ap_bpush_socket(*script_err, sock);
             ap_bsetopt(*script_err, BO_TIMEOUT, &r->server->timeout);
         }
     }
index 2aec35f8601ba417f85d7791190c400da968c6c1..b99357497b53d8974aac944a49b612e34ca5f52d 100644 (file)
@@ -89,7 +89,6 @@
 #include "http_conf_globals.h" 
 #include "buff.h" 
 #include "ap_mpm.h"
-#include "ap_iol.h"
 #include "unixd.h"
 #include <sys/stat.h>
 #ifdef HAVE_SYS_SOCKET_H
@@ -840,7 +839,6 @@ static int cgid_handler(request_rec *r)
     struct sockaddr_un unix_addr;
     apr_socket_t *tempsock = NULL;
     int nbytes;
-    ap_iol *iol;
     script = ap_bcreate(r->pool, B_RDWR); 
 
     if (r->method_number == M_OPTIONS) { 
@@ -920,9 +918,7 @@ static int cgid_handler(request_rec *r)
 
     apr_put_os_sock(&tempsock, &sd, pcgi);
 
-    iol = ap_iol_attach_socket(pcgi, tempsock);
-
-    ap_bpush_iol(script, iol); 
+    ap_bpush_socket(script, tempsock); 
 
     if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) 
         return retval; 
index 7c4d13430d394bddade1e56c8385bff5183134a9..f15e6368e6e0006b00907494fb99dbe9239e1cb7 100644 (file)
@@ -2966,7 +2966,7 @@ static int chunk_filter(ap_filter_t *f, ap_bucket_brigade *b)
 /* Default filter.  This filter should almost always be used.  It's only job
  * is to send the headers if they haven't already been sent, and then send
  * the actual data.  To send the data, we create an iovec out of the bucket
- * brigade and then call the iol's writev function.  On platforms that don't
+ * brigade and then call the sendv function.  On platforms that don't
  * have writev, we have the problem of creating a lot of potentially small
  * packets that we are sending to the network.
  *
index 6f385a7fdf03b4857c9be0cea97af95f9c75a8e9..615744ba4324e95d6b64dfae321513f3b680e12a 100644 (file)
@@ -2311,7 +2311,7 @@ static apr_status_t static_send_file(apr_file_t *fd, request_rec *r, apr_off_t o
 
     /*
      * We want to send any data held in the client buffer on the
-     * call to iol_sendfile. So hijack it then set outcnt to 0
+     * call to apr_sendfile. So hijack it then set outcnt to 0
      * to prevent the data from being sent to the client again
      * when the buffer is flushed to the client at the end of the
      * request.
@@ -2332,7 +2332,7 @@ static apr_status_t static_send_file(apr_file_t *fd, request_rec *r, apr_off_t o
         flags |= APR_SENDFILE_DISCONNECT_SOCKET;
     }
 
-    rv = iol_sendfile(r->connection->client->iol
+    rv = apr_sendfile(r->connection->client->bsock
                       fd,      /* The file to send */
                       &hdtr,   /* Header and trailer iovecs */
                       &offset, /* Offset in file to begin sending from */
index b6514dc87c76a6e43077f27b752861116d6bd509..6e07168724dcf20004bc0d2a22759cc6aa0e7746 100644 (file)
@@ -2149,7 +2149,7 @@ static int uncompress_child(struct uncompress_parms *parm, apr_pool_t *cntxt,
     apr_pool_t *child_context = cntxt;
     apr_procattr_t *procattr;
     apr_proc_t *procnew;
-    ap_iol *iol;
+    apr_socket_t *sock;
 
     env = ap_create_environment(child_context, r->subprocess_env);
 
@@ -2185,13 +2185,16 @@ static int uncompress_child(struct uncompress_parms *parm, apr_pool_t *cntxt,
         else {
             apr_note_subprocess(child_context, procnew, kill_after_timeout);
             /* Fill in BUFF structure for parents pipe to child's stdout */
-            iol = ap_create_file_iol(procnew->out);
-            if (!iol)
-                return APR_EBADF;
+            /* XXX This is a hack.  The correct solution is to create a
+             * pipe bucket, and just pass it down.  Since that bucket type
+             * hasn't been written, we can hack it for the moment.
+             */
+            apr_socket_from_file(&sock, procnew->out);
+
             if (script_in) {
                 *script_in = ap_bcreate(child_context, B_RD);
             }
-            ap_bpush_iol(*script_in, iol);
+            ap_bpush_socket(*script_in, sock);
         }
     }
 
index d5c14dd3559e844b09d49035f9f3e6bde658d9a2..b8fe622863b728713fdf290eedea0f3120add120 100644 (file)
@@ -61,7 +61,6 @@
 #include "mod_proxy.h"
 #include "http_log.h"
 #include "http_main.h"
-#include "ap_iol.h"
 
 #ifdef HAVE_BSTRING_H
 #include <bstring.h>        /* for IRIX, FD_SET calls bzero() */
@@ -211,7 +210,7 @@ int ap_proxy_connect_handler(request_rec *r, ap_cache_el  *c, char *url,
     }
 
     sock_buff = ap_bcreate(r->pool, B_RDWR);
-    ap_bpush_iol(sock_buff, ap_iol_attach_socket(sock));
+    ap_bpush_socket(sock_buff, sock);
 
     if(apr_setup_poll(&pollfd, 2, r->pool) != APR_SUCCESS)
     {
index a0a4f48c8e8dd88aa4e19a358ef5ec8f3ee5112f..62c85cfaca7dda879034e96b5aa0f1b574e6df05 100644 (file)
@@ -62,7 +62,6 @@
 #include "http_main.h"
 #include "http_log.h"
 #include "http_core.h"
-#include "ap_iol.h"
 
 #define AUTODETECT_PWD
 
@@ -589,7 +588,7 @@ int ap_proxy_ftp_handler(request_rec *r, ap_cache_el  *c, char *url)
     }
 
     f = ap_bcreate(p, B_RDWR);
-    ap_bpush_iol(f, ap_iol_attach_socket(sock));
+    ap_bpush_socket(f, sock);
 /* shouldn't we implement telnet control options here? */
 
 #ifdef CHARSET_EBCDIC
@@ -1146,11 +1145,11 @@ int ap_proxy_ftp_handler(request_rec *r, ap_cache_el  *c, char *url)
             }
         }
         data = ap_bcreate(p, B_RDWR);
-        ap_bpush_iol(f, ap_iol_attach_socket(csd));
+        ap_bpush_socket(f, csd);
     }
     else {
         data = ap_bcreate(p, B_RDWR);
-        ap_bpush_iol(data, ap_iol_attach_socket(dsock));
+        ap_bpush_socket(data, dsock);
     }
 
 /* send response */
index cb2eaff524ad67ac7789bdd12f67903c52eff990..0f7b550ce6a864aa1f14fd4393c3df4fe6306cc2 100644 (file)
@@ -63,7 +63,6 @@
 #include "http_main.h"
 #include "http_core.h"
 #include "util_date.h"
-#include "ap_iol.h"
 
 /*
  * Canonicalise http-like URLs.
@@ -269,7 +268,7 @@ int ap_proxy_http_handler(request_rec *r, ap_cache_el  *c, char *url,
     clear_connection(r->pool, r->headers_in);    /* Strip connection-based headers */
 
     f = ap_bcreate(p, B_RDWR);
-    ap_bpush_iol(f, ap_iol_attach_socket(sock));
+    ap_bpush_socket(f, sock);
 
     ap_bvputs(f, r->method, " ", proxyhost ? url : urlptr, " HTTP/1.0" CRLF,
               NULL);
index a5e5432ee768c05e5f6a272b371e87ef97b5bea7..dd30e010f8860108ef300945f9363c51ad050ec2 100644 (file)
@@ -7,7 +7,7 @@ LTLIBRARY_SOURCES = \
        buff.c http_config.c http_core.c http_log.c http_main.c \
        http_protocol.c http_request.c http_vhost.c util.c util_date.c \
        util_script.c util_uri.c util_md5.c util_cfgtree.c util_ebcdic.c \
-       rfc1413.c http_connection.c iol_file.c iol_socket.c listen.c \
+       rfc1413.c http_connection.c listen.c \
         mpm_common.c util_charset.c util_debug.c util_xml.c \
        util_filter.c
 
index 7a664788b5e7259699650c0fa3e099e0e408b2ca..f99d14a4d4a8881be581069b6ef7af9d12cbcb02 100644 (file)
@@ -76,7 +76,6 @@
 #include "http_connection.h"
 #include "ap_mpm.h"
 #include "beosd.h"
-#include "ap_iol.h"
 #include "ap_listen.h"
 #include "scoreboard.h" 
 #include <kernel/OS.h>
@@ -308,7 +307,6 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, int my_child_num)
 {
     BUFF *conn_io;
     conn_rec *current_conn;
-    ap_iol *iol;
     long conn_id = my_child_num;
     int csd;
 
@@ -323,16 +321,8 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, int my_child_num)
            return;
     }
     
-    iol = ap_iol_attach_socket(p, sock);
-    if (iol == NULL) {
-        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, NULL,
-          "error attaching to socket");
-        apr_close_socket(sock);
-           return;
-    }
-
     conn_io = ap_bcreate(p, B_RDWR);
-    ap_bpush_iol(conn_io, iol);
+    ap_bpush_socket(conn_io, sock);
 
     current_conn = ap_new_apr_connection(p, ap_server_conf, conn_io, sock, 
                                          conn_id);
index 664e8f03d13afd218fcb03e9f9ca6ad6a38c5dde..e844fed028f3a19fb8229d6760f363597d743635 100644 (file)
@@ -71,7 +71,6 @@
 #include "ap_mpm.h"
 #include "unixd.h"
 #include "mpm_common.h"
-#include "ap_iol.h"
 #include "ap_listen.h"
 #include "mpm_default.h"
 #include "mpm.h"
@@ -398,7 +397,6 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, long conn_id)
 {
     BUFF *conn_io;
     conn_rec *current_conn;
-    ap_iol *iol;
     int csd;
     apr_status_t rv;
 
@@ -417,9 +415,9 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, long conn_id)
     }
 
     ap_sock_disable_nagle(sock);
-    iol = ap_iol_attach_socket(p, sock);
+
     conn_io = ap_bcreate(p, B_RDWR);
-    ap_bpush_iol(conn_io, iol);
+    ap_bpush_socket(conn_io, sock);
 
     current_conn = ap_new_apr_connection(p, ap_server_conf, conn_io, sock,
                                          conn_id);
index ab3a0cbd574d1fc070936087a8215339af7f1bfa..8775d6bd5ed35681f256fe9bc14427a7d98ea13e 100644 (file)
@@ -73,7 +73,6 @@
 #include "ap_mpm.h"
 #include "unixd.h"
 #include "mpm_common.h"
-#include "ap_iol.h"
 #include "ap_listen.h"
 #include "mpm_default.h"
 #include "mpm.h"
@@ -433,7 +432,6 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, long conn_id)
 {
     BUFF *conn_io;
     conn_rec *current_conn;
-    ap_iol *iol;
     int csd;
     apr_status_t rv;
     int thread_num = conn_id % HARD_THREAD_LIMIT;
@@ -455,9 +453,8 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, long conn_id)
     if (thread_socket_table[thread_num] < 0) {
         ap_sock_disable_nagle(sock);
     }
-    iol = ap_iol_attach_socket(p, sock);
     conn_io = ap_bcreate(p, B_RDWR);
-    ap_bpush_iol(conn_io, iol);
+    ap_bpush_socket(conn_io, sock);
 
     current_conn = ap_new_apr_connection(p, ap_server_conf, conn_io, sock,
                                          conn_id);
@@ -1346,7 +1343,7 @@ static void perchild_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *pte
 
 static int pass_request(request_rec *r)
 {
-    apr_socket_t *thesock = ap_iol_get_socket(r->connection->client->iol);
+    apr_socket_t *thesock = r->connection->client->bsock;
     struct msghdr msg;
     struct cmsghdr *cmsg;
     int sfd;
@@ -1439,13 +1436,11 @@ static int perchild_post_read(request_rec *r)
 
     if (thread_socket_table[thread_num] != -1) {
         apr_socket_t *csd = NULL;
-        ap_iol *iol;
 
         apr_put_os_sock(&csd, &thread_socket_table[thread_num], 
                              r->connection->client->pool);
         ap_sock_disable_nagle(thread_socket_table[thread_num]);
-        iol = ap_iol_attach_socket(r->connection->client->pool, csd);
-        ap_bpush_iol(r->connection->client, iol);
+        ap_bpush_socket(r->connection->client, csd);
         return OK;
     }
     else {
index 7c675b4612128cd88e7ad9e4fea0143516b74629..20431f376c4dbcbe4e98c21b56456aa73346c6ab 100644 (file)
@@ -72,7 +72,6 @@
 #include "http_connection.h"
 #include "ap_mpm.h"
 #include "beosd.h"
-#include "ap_iol.h"
 #include "ap_listen.h"
 #include "scoreboard.h" 
 #include "poll.h"
@@ -298,28 +297,11 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, int my_child_num,
 {
     BUFF *conn_io;
     conn_rec *current_conn;
-    ap_iol *iol;
     long conn_id = my_child_num * HARD_THREAD_LIMIT + my_thread_num;
     int csd;
 
-    iol = ap_iol_attach_socket(p, sock);
-    if (iol == NULL) {
-        if (errno == EBADF) {
-            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, NULL,
-                "filedescriptor (%u) larger than FD_SETSIZE (%u) "
-                "found, you probably need to rebuild Apache with a "
-                "larger FD_SETSIZE", csd, FD_SETSIZE);
-        }
-        else {
-            ap_log_error(APLOG_MARK, APLOG_WARNING, errno, NULL,
-                "error attaching to socket");
-        }
-        apr_close_socket(sock);
-       return;
-    }
-
     conn_io = ap_bcreate(p, B_RDWR);
-    ap_bpush_iol(conn_io, iol);
+    ap_bpush_socket(conn_io, sock);
 
     current_conn = ap_new_apr_connection(p, ap_server_conf, conn_io, sock, 
                                          conn_id);
index ad3ca6d8425229744c476ba53fae6dfff21b392d..79da49018c75478a1637a0ee1e931fc4deba8e89 100644 (file)
@@ -72,7 +72,6 @@
 #include "ap_mpm.h"
 #include "unixd.h"
 #include "mpm_common.h"
-#include "ap_iol.h"
 #include "ap_listen.h"
 #include "scoreboard.h" 
 
@@ -395,7 +394,6 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, int my_child_num,
 {
     BUFF *conn_io;
     conn_rec *current_conn;
-    ap_iol *iol;
     long conn_id = my_child_num * HARD_THREAD_LIMIT + my_thread_num;
     int csd;
 
@@ -413,12 +411,10 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, int my_child_num,
 
     ap_sock_disable_nagle(sock);
 
-    iol = ap_iol_attach_socket(p, sock);
-
     (void) ap_update_child_status(my_child_num, my_thread_num,  
                                  SERVER_BUSY_READ, (request_rec *) NULL);
     conn_io = ap_bcreate(p, B_RDWR);
-    ap_bpush_iol(conn_io, iol);
+    ap_bpush_socket(conn_io, sock);
 
     current_conn = ap_new_apr_connection(p, ap_server_conf, conn_io, sock,
                                          conn_id);
index ab3a0cbd574d1fc070936087a8215339af7f1bfa..8775d6bd5ed35681f256fe9bc14427a7d98ea13e 100644 (file)
@@ -73,7 +73,6 @@
 #include "ap_mpm.h"
 #include "unixd.h"
 #include "mpm_common.h"
-#include "ap_iol.h"
 #include "ap_listen.h"
 #include "mpm_default.h"
 #include "mpm.h"
@@ -433,7 +432,6 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, long conn_id)
 {
     BUFF *conn_io;
     conn_rec *current_conn;
-    ap_iol *iol;
     int csd;
     apr_status_t rv;
     int thread_num = conn_id % HARD_THREAD_LIMIT;
@@ -455,9 +453,8 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, long conn_id)
     if (thread_socket_table[thread_num] < 0) {
         ap_sock_disable_nagle(sock);
     }
-    iol = ap_iol_attach_socket(p, sock);
     conn_io = ap_bcreate(p, B_RDWR);
-    ap_bpush_iol(conn_io, iol);
+    ap_bpush_socket(conn_io, sock);
 
     current_conn = ap_new_apr_connection(p, ap_server_conf, conn_io, sock,
                                          conn_id);
@@ -1346,7 +1343,7 @@ static void perchild_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *pte
 
 static int pass_request(request_rec *r)
 {
-    apr_socket_t *thesock = ap_iol_get_socket(r->connection->client->iol);
+    apr_socket_t *thesock = r->connection->client->bsock;
     struct msghdr msg;
     struct cmsghdr *cmsg;
     int sfd;
@@ -1439,13 +1436,11 @@ static int perchild_post_read(request_rec *r)
 
     if (thread_socket_table[thread_num] != -1) {
         apr_socket_t *csd = NULL;
-        ap_iol *iol;
 
         apr_put_os_sock(&csd, &thread_socket_table[thread_num], 
                              r->connection->client->pool);
         ap_sock_disable_nagle(thread_socket_table[thread_num]);
-        iol = ap_iol_attach_socket(r->connection->client->pool, csd);
-        ap_bpush_iol(r->connection->client, iol);
+        ap_bpush_socket(r->connection->client, csd);
         return OK;
     }
     else {
index 64cffcaa197a4f09a53465e3fe84007a9a69c47e..286c1f16278a0abf5ad3a1e3179542d748e0deeb 100644 (file)
 #include "ap_mpm.h"
 #include "unixd.h"
 #include "mpm_common.h"
-#include "ap_iol.h"
 #include "ap_listen.h"
 #include "ap_mmn.h"
 #ifdef HAVE_SYS_TYPES_H
@@ -748,7 +747,6 @@ static void child_main(int child_num_arg)
     ap_listen_rec *first_lr;
     apr_pool_t *ptrans;
     conn_rec *current_conn;
-    ap_iol *iol;
     apr_status_t stat = APR_EINIT;
     int sockdes;
 
@@ -1022,13 +1020,12 @@ static void child_main(int child_num_arg)
 
        ap_sock_disable_nagle(csd);
 
-       iol = ap_iol_attach_socket(ptrans, csd);
        (void) ap_update_child_status(my_child_num, SERVER_BUSY_READ,
                                   (request_rec *) NULL);
 
        conn_io = ap_bcreate(ptrans, B_RDWR);
 
-       ap_bpush_iol(conn_io, iol);
+       ap_bpush_socket(conn_io, csd);
 
        current_conn = ap_new_apr_connection(ptrans, ap_server_conf, conn_io, csd,
                                         my_child_num);
index 8cba8adc3b2bbc59b202ce9687c1663d54c9221d..33fa3f6e746a276c7290214ff05515bf2b47cd7c 100644 (file)
@@ -71,7 +71,6 @@
 #include "scoreboard.h"
 #include "ap_mpm.h"
 #include "ap_listen.h"
-#include "ap_iol.h"
 #include "apr_portable.h"
 #include "mpm_common.h"
 #include "apr_strings.h"
@@ -742,7 +741,6 @@ static void child_main(void *child_num_arg)
     ap_listen_rec *first_lr = NULL;
     apr_pool_t *ptrans;
     conn_rec *current_conn;
-    ap_iol *iol;
     apr_pool_t *pchild;
     parent_score *sc_parent_rec;
     int requests_this_child = 0;
@@ -968,20 +966,11 @@ static void child_main(void *child_num_arg)
 
        ap_sock_disable_nagle(csd);
 
-        iol = ap_iol_attach_socket(ptrans, csd);
-
-       if (iol == NULL) {
-          ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, NULL,
-                       "error attaching to socket");
-           apr_close_socket(csd);
-           continue;
-        }
-
        (void) ap_update_child_status(THREAD_GLOBAL(child_num), SERVER_BUSY_READ,
                                   (request_rec *) NULL);
 
        conn_io = ap_bcreate(ptrans, B_RDWR);
-        ap_bpush_iol(conn_io, iol);
+        ap_bpush_socket(conn_io, csd);
 
        current_conn = ap_new_apr_connection(ptrans, ap_server_conf, conn_io, csd,
                                              THREAD_GLOBAL(child_num));
index 1b764f38fe26fdb124b6dd22f874d7265b1619c6..d41ec93b4ff943ad256bb0a92ea44a340de65578 100644 (file)
@@ -70,7 +70,6 @@
 #include "ap_config.h"
 #include "ap_listen.h"
 #include "mpm_default.h"
-#include "ap_iol.h"
 #include "mpm_winnt.h"
 #include "mpm_common.h"
 
@@ -1123,7 +1122,6 @@ static void worker_main(int child_num)
 
     while (1) {
         conn_rec *c;
-        ap_iol *iol;
         apr_int32_t disconnected;
 
         /* Grab a connection off the network */
@@ -1139,14 +1137,7 @@ static void worker_main(int child_num)
         sock_disable_nagle(context->accept_socket);
         apr_put_os_sock(&context->sock, &context->accept_socket, context->ptrans);
 
-        iol = ap_iol_attach_socket(context->ptrans, context->sock);
-        if (iol == NULL) {
-            ap_log_error(APLOG_MARK, APLOG_ERR, APR_ENOMEM, server_conf,
-                         "worker_main: attach_socket() failed. Continuing...");
-            closesocket(context->accept_socket);
-            continue;
-        }
-        ap_bpush_iol(context->conn_io, iol);
+        ap_bpush_socket(context->conn_io, context->sock);
         c = ap_new_connection(context->ptrans, server_conf, context->conn_io,
                               (struct sockaddr_in *) context->sa_client,
                               (struct sockaddr_in *) context->sa_server,
@@ -1157,11 +1148,13 @@ static void worker_main(int child_num)
 
         apr_getsocketopt(context->sock, APR_SO_DISCONNECTED, &disconnected);
         if (disconnected) {
+            /* I have no idea if we should do anything here, so I leave this
+             * for a windows guy
+             */
             /* Kill the clean-up registered by the iol. We want to leave 
              * the accept socket open because we are about to try to 
              * reuse it
              */
-            ap_bpop_iol(&iol, context->conn_io);
         }
         else {
             context->accept_socket = INVALID_SOCKET;