]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Combine some common code. Before this, all platforms implemented their
authorRyan Bloom <rbb@apache.org>
Fri, 30 Jun 2000 18:08:13 +0000 (18:08 +0000)
committerRyan Bloom <rbb@apache.org>
Fri, 30 Jun 2000 18:08:13 +0000 (18:08 +0000)
own iol_sockets using APR.  This just combines all of that code to a
common file and moves that file to main.  I have tested this with all of
the Unix MPM's, but I am willing to bet I missed something (Makefiles) for
Windows, and possibly moving some code for OS/2 and BeOS.

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

13 files changed:
modules/generators/mod_cgid.c
modules/proxy/proxy_connect.c
modules/proxy/proxy_ftp.c
modules/proxy/proxy_http.c
os/unix/Makefile.in
server/Makefile.in
server/mpm/beos/beos.c
server/mpm/dexter/dexter.c
server/mpm/mpmt_beos/mpmt_beos.c
server/mpm/mpmt_pthread/mpmt_pthread.c
server/mpm/prefork/prefork.c
server/mpm/spmt_os2/spmt_os2.c
server/mpm/winnt/mpm_winnt.c

index 732fec5aacbede28b50d43ef5015210f5d7847a5..e3cf754a0c000f55ca1e1de3a1745054beb811de 100644 (file)
@@ -898,7 +898,7 @@ static int cgid_handler(request_rec *r)
 
     ap_put_os_sock(&tempsock, &sd, pcgi);
 
-    iol = unix_attach_socket(tempsock);
+    iol = ap_iol_attach_socket(tempsock);
 
     ap_bpush_iol(script, iol); 
 
index bc2b101806640fb15eeecfbbbe36433da2ede58f..a7811aef6a8b7e74872c6ebb58f84d33af50fb4b 100644 (file)
@@ -211,7 +211,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, unix_attach_socket(sock));
+    ap_bpush_iol(sock_buff, ap_iol_attach_socket(sock));
 
     if(ap_setup_poll(&pollfd, 2, r->pool) != APR_SUCCESS)
     {
index 7bf446d43b5db453e6e19d2c993c83a9eb5da7d6..15c9e40b68ce0f8d443cba7c7d7edcfbfb32aad4 100644 (file)
@@ -589,7 +589,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, unix_attach_socket(sock));
+    ap_bpush_iol(f, ap_iol_attach_socket(sock));
 /* shouldn't we implement telnet control options here? */
 
 #ifdef CHARSET_EBCDIC
@@ -1146,11 +1146,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, unix_attach_socket(csd));
+        ap_bpush_iol(f, ap_iol_attach_socket(csd));
     }
     else {
         data = ap_bcreate(p, B_RDWR);
-        ap_bpush_iol(data, unix_attach_socket(dsock));
+        ap_bpush_iol(data, ap_iol_attach_socket(dsock));
     }
 
 /* send response */
index 800734f5c4b9f33692b3307fdc7764ca289791f9..e22ef00e6c25d5a665dd9d0d40df4e3b0b2682cc 100644 (file)
@@ -269,7 +269,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, unix_attach_socket(sock));
+    ap_bpush_iol(f, ap_iol_attach_socket(sock));
 
     ap_bvputs(f, r->method, " ", proxyhost ? url : urlptr, " HTTP/1.0" CRLF,
               NULL);
index 3f95e080a798f2319a358afae02de39a7bb53580..63596967db125f6ceb5798cf56a04b7465f5309c 100644 (file)
@@ -1,5 +1,5 @@
 
 LTLIBRARY_NAME    = libos.la
-LTLIBRARY_SOURCES = os-inline.c unixd.c iol_socket.c
+LTLIBRARY_SOURCES = os-inline.c unixd.c
 
 include $(top_srcdir)/build/ltlib.mk
index a3f75f421fb7aad2cce7c296e0783085b1e76fd1..7ebf0190d537507b28e37c20d0c9e8eab409fee3 100644 (file)
@@ -7,8 +7,8 @@ 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 listen.c mpm_common.c \
-       util_charset.c util_debug.c
+       rfc1413.c http_connection.c iol_file.c iol_socket.c listen.c \
+        mpm_common.c util_charset.c util_debug.c
 
 include $(top_srcdir)/build/ltlib.mk
 
index 0419f66846e82d041f7876cf6736111285176488..bb150ccbdfe186a23dc234713d52532ed442a7f7 100644 (file)
@@ -393,7 +393,7 @@ static void process_socket(ap_pool_t *p, ap_socket_t *sock, int my_child_num)
            return;
     }
     
-    iol = beos_attach_socket(sock);
+    iol = ap_iol_attach_socket(sock);
     if (iol == NULL) {
         ap_log_error(APLOG_MARK, APLOG_WARNING, errno, NULL,
           "error attaching to socket");
index 7a444b9be6dc9445ca85d5887f43b1a99cb6fd10..039d2c80d197534c7b7c8f65592fe623d6e6e2df 100644 (file)
@@ -509,7 +509,7 @@ static void process_socket(ap_pool_t *p, ap_socket_t *sock, long conn_id)
     }
 
     sock_disable_nagle(csd);
-    iol = unix_attach_socket(sock);
+    iol = ap_iol_attach_socket(sock);
     conn_io = ap_bcreate(p, B_RDWR);
     ap_bpush_iol(conn_io, iol);
 
index adc0538681ec8893fe76f24d222950ec67ce5d3a..802a4c06d9fe98bc496a95755fcd132fc48fb160 100644 (file)
@@ -370,7 +370,7 @@ static void process_socket(ap_pool_t *p, ap_socket_t *sock, int my_child_num, in
     long conn_id = my_child_num * HARD_THREAD_LIMIT + my_thread_num;
     int csd;
 
-    iol = beos_attach_socket(sock);
+    iol = ap_iol_attach_socket(sock);
     if (iol == NULL) {
         if (errno == EBADF) {
             ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, NULL,
index 3b3a78ba216a2b3f29ef4c909ff3eec30c788b5b..8d2f29d7aa12ef812fe5e935f694c25d6b96d3a2 100644 (file)
@@ -504,7 +504,7 @@ static void process_socket(ap_pool_t *p, ap_socket_t *sock, int my_child_num, in
 
     sock_disable_nagle(csd);
 
-    iol = unix_attach_socket(sock);
+    iol = ap_iol_attach_socket(sock);
 
     (void) ap_update_child_status(my_child_num, my_thread_num,  
                                  SERVER_BUSY_READ, (request_rec *) NULL);
index 5a4f1d64e094c6f3cacff5c735d3d157c86e24ba..c4279ba48112935262966d6ec2d3ff507249a3c8 100644 (file)
@@ -1039,7 +1039,7 @@ static void child_main(int child_num_arg)
 
        sock_disable_nagle(sockdes);
 
-       iol = unix_attach_socket(csd);
+       iol = ap_iol_attach_socket(csd);
        (void) ap_update_child_status(my_child_num, SERVER_BUSY_READ,
                                   (request_rec *) NULL);
 
index 0d707c22bbbb27a6269a9c424b8852547939d88e..38a8cadf44be8cf144b20e012c3aa0495ffd05e3 100644 (file)
@@ -994,7 +994,7 @@ static void child_main(void *child_num_arg)
 
        sock_disable_nagle(csd);
 
-        iol = os2_attach_socket(csd);
+        iol = ap_iol_attach_socket(csd);
 
        if (iol == NULL) {
           ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, NULL,
index 616a17048e97067d55f775b14eccba8c84352299..492ab748ea75b23a23f7f2941ad199c4d52f43af 100644 (file)
@@ -1085,7 +1085,7 @@ static void worker_main(int child_num)
         sock_disable_nagle(context->accept_socket);
         ap_put_os_sock(&context->sock, &context->accept_socket, context->ptrans);
 
-        iol = win32_attach_socket(context->ptrans, context->sock);
+        iol = ap_iol_attach_socket(context->sock);
         if (iol == NULL) {
             ap_log_error(APLOG_MARK, APLOG_ERR, APR_ENOMEM, server_conf,
                          "worker_main: attach_socket() failed. Continuing...");