httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/support ab.c
Date Mon, 15 Jul 2002 08:05:11 GMT
wrowe       2002/07/15 01:05:11

  Modified:    server   connection.c listen.c mpm_common.c
               server/mpm/experimental/threadpool threadpool.c
               server/mpm/netware mpm_netware.c
               server/mpm/winnt mpm_winnt.c
               modules/proxy proxy_ftp.c proxy_util.c
               modules/http http_core.c
               support  ab.c
  Log:
    http occurances to update for apr_socket_opt_get/set
  
  Revision  Changes    Path
  1.106     +1 -1      httpd-2.0/server/connection.c
  
  Index: connection.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/connection.c,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- connection.c	15 Jul 2002 07:46:19 -0000	1.105
  +++ connection.c	15 Jul 2002 08:05:10 -0000	1.106
  @@ -180,7 +180,7 @@
        */
       timeout = apr_time_from_sec(SECONDS_TO_LINGER);
       apr_socket_timeout_set(csd, timeout);
  -    apr_setsocketopt(csd, APR_INCOMPLETE_READ, 1);
  +    apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 1);
       while (1) {
           nbytes = sizeof(dummybuf);
           rc = apr_recv(csd, dummybuf, &nbytes);
  
  
  
  1.80      +7 -7      httpd-2.0/server/listen.c
  
  Index: listen.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/listen.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- listen.c	9 Apr 2002 06:48:31 -0000	1.79
  +++ listen.c	15 Jul 2002 08:05:10 -0000	1.80
  @@ -91,20 +91,20 @@
       apr_status_t stat;
   
   #ifndef WIN32
  -    stat = apr_setsocketopt(s, APR_SO_REUSEADDR, one);
  +    stat = apr_socket_opt_set(s, APR_SO_REUSEADDR, one);
       if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
           ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
  -                      "make_sock: for address %pI, setsockopt: (SO_REUSEADDR)",
  +                      "make_sock: for address %pI, apr_socket_opt_set: (SO_REUSEADDR)",
                         server->bind_addr);
           apr_socket_close(s);
           return stat;
       }
   #endif
   
  -    stat = apr_setsocketopt(s, APR_SO_KEEPALIVE, one);
  +    stat = apr_socket_opt_set(s, APR_SO_KEEPALIVE, one);
       if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
           ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
  -                      "make_sock: for address %pI, setsockopt: (SO_KEEPALIVE)",
  +                      "make_sock: for address %pI, apr_socket_opt_set: (SO_KEEPALIVE)",
                         server->bind_addr);
           apr_socket_close(s);
           return stat;
  @@ -130,7 +130,7 @@
        * If no size is specified, use the kernel default.
        */
       if (send_buffer_size) {
  -        stat = apr_setsocketopt(s, APR_SO_SNDBUF,  send_buffer_size);
  +        stat = apr_socket_opt_set(s, APR_SO_SNDBUF,  send_buffer_size);
           if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
               ap_log_perror(APLOG_MARK, APLOG_WARNING, stat, p,
                             "make_sock: failed to set SendBufferSize for "
  @@ -172,10 +172,10 @@
        * So set reuseaddr, but do not attempt to do so until we have the
        * parent listeners successfully bound.
        */
  -    stat = apr_setsocketopt(s, APR_SO_REUSEADDR, one);
  +    stat = apr_socket_opt_set(s, APR_SO_REUSEADDR, one);
       if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
           ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
  -                    "make_sock: for address %pI, setsockopt: (SO_REUSEADDR)", 
  +                    "make_sock: for address %pI, apr_socket_opt_set: (SO_REUSEADDR)", 
                        server->bind_addr);
           apr_socket_close(s);
           return stat;
  
  
  
  1.102     +2 -2      httpd-2.0/server/mpm_common.c
  
  Index: mpm_common.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm_common.c,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- mpm_common.c	15 Jul 2002 07:46:19 -0000	1.101
  +++ mpm_common.c	15 Jul 2002 08:05:10 -0000	1.102
  @@ -314,11 +314,11 @@
        *
        * In spite of these problems, failure here is not a shooting offense.
        */
  -    apr_status_t status = apr_setsocketopt(s, APR_TCP_NODELAY, 1);
  +    apr_status_t status = apr_socket_opt_set(s, APR_TCP_NODELAY, 1);
   
       if (status != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_WARNING, status, ap_server_conf,
  -                     "setsockopt: (TCP_NODELAY)");
  +                     "apr_socket_opt_set: (TCP_NODELAY)");
       }
   }
   #endif
  
  
  
  1.14      +1 -1      httpd-2.0/server/mpm/experimental/threadpool/threadpool.c
  
  Index: threadpool.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/experimental/threadpool/threadpool.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- threadpool.c	11 Jul 2002 05:42:20 -0000	1.13
  +++ threadpool.c	15 Jul 2002 08:05:10 -0000	1.14
  @@ -1958,7 +1958,7 @@
   
   #if APR_O_NONBLOCK_INHERITED
       for(lr = ap_listeners ; lr != NULL ; lr = lr->next) {
  -        apr_setsocketopt(lr->sd, APR_SO_NONBLOCK, 1);
  +        apr_socket_opt_set(lr->sd, APR_SO_NONBLOCK, 1);
       }
   #endif /* APR_O_NONBLOCK_INHERITED */
   
  
  
  
  1.57      +2 -2      httpd-2.0/server/mpm/netware/mpm_netware.c
  
  Index: mpm_netware.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/netware/mpm_netware.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- mpm_netware.c	4 Jul 2002 15:20:54 -0000	1.56
  +++ mpm_netware.c	15 Jul 2002 08:05:10 -0000	1.57
  @@ -465,7 +465,7 @@
               /* If we got a new socket, set it to non-blocking mode and process
                   it.  Otherwise handle the error. */
               if (stat == APR_SUCCESS) {
  -                apr_setsocketopt(csd, APR_SO_NONBLOCK, 0);
  +                apr_socket_opt_set(csd, APR_SO_NONBLOCK, 0);
   #ifdef DBINFO_ON
                   if (wouldblock_retry < MAX_WB_RETRIES) {
                       retry_success++;
  @@ -851,7 +851,7 @@
           }
           /* Use non-blocking listen sockets so that we
              never get hung up. */
  -        apr_setsocketopt(lr->sd, APR_SO_NONBLOCK, 1);
  +        apr_socket_opt_set(lr->sd, APR_SO_NONBLOCK, 1);
       }
       return 0;
   }
  
  
  
  1.287     +2 -1      httpd-2.0/server/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.286
  retrieving revision 1.287
  diff -u -r1.286 -r1.287
  --- mpm_winnt.c	5 Jul 2002 17:24:16 -0000	1.286
  +++ mpm_winnt.c	15 Jul 2002 08:05:10 -0000	1.287
  @@ -1149,7 +1149,8 @@
   
           if (c) {
               ap_process_connection(c, context->sock);
  -            apr_getsocketopt(context->sock, APR_SO_DISCONNECTED, &disconnected);
  +            apr_socket_opt_get(context->sock, APR_SO_DISCONNECTED, 
  +                               &disconnected);
               if (!disconnected) {
                   context->accept_socket = INVALID_SOCKET;
                   ap_lingering_close(c);
  
  
  
  1.128     +16 -12    httpd-2.0/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.127
  retrieving revision 1.128
  diff -u -r1.127 -r1.128
  --- proxy_ftp.c	15 Jul 2002 07:46:19 -0000	1.127
  +++ proxy_ftp.c	15 Jul 2002 08:05:10 -0000	1.128
  @@ -951,17 +951,18 @@
   
   #if !defined(TPF) && !defined(BEOS)
       if (conf->recv_buffer_size > 0
  -        && (rv = apr_setsocketopt(sock, APR_SO_RCVBUF,
  -                                  conf->recv_buffer_size))) {
  +        && (rv = apr_socket_opt_set(sock, APR_SO_RCVBUF,
  +                                    conf->recv_buffer_size))) {
           ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
  -                      "setsockopt(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using
default");
  +                      "apr_socket_opt_set(SO_RCVBUF): Failed to set ProxyReceiveBufferSize,
using default");
       }
   #endif
   
  -    if (APR_SUCCESS != (rv = apr_setsocketopt(sock, APR_SO_REUSEADDR, one))) {
  +    if ((rv = apr_socket_opt_set(sock, APR_SO_REUSEADDR, one)) 
  +            != APR_SUCCESS) {
   #ifndef _OSD_POSIX              /* BS2000 has this option "always on" */
           ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
  -                      "proxy: FTP: error setting reuseaddr option: setsockopt(SO_REUSEADDR)");
  +                      "proxy: FTP: error setting reuseaddr option: apr_socket_opt_set(SO_REUSEADDR)");
           return HTTP_INTERNAL_SERVER_ERROR;
   #endif                          /* _OSD_POSIX */
       }
  @@ -1288,10 +1289,11 @@
                   }
   
   #if !defined (TPF) && !defined(BEOS)
  -                if (conf->recv_buffer_size > 0 && (rv = apr_setsocketopt(data_sock,
APR_SO_RCVBUF,
  -                                                 conf->recv_buffer_size))) {
  +                if (conf->recv_buffer_size > 0 
  +                        && (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
  +                                                    conf->recv_buffer_size))) {
                       ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
  -                                  "proxy: FTP: setsockopt(SO_RCVBUF): Failed to set ProxyReceiveBufferSize,
using default");
  +                                  "proxy: FTP: apr_socket_opt_set(SO_RCVBUF): Failed to
set ProxyReceiveBufferSize, using default");
                   }
   #endif
   
  @@ -1374,10 +1376,11 @@
                   }
   
   #if !defined (TPF) && !defined(BEOS)
  -                if (conf->recv_buffer_size > 0 && (rv = apr_setsocketopt(data_sock,
APR_SO_RCVBUF,
  -                                                 conf->recv_buffer_size))) {
  +                if (conf->recv_buffer_size > 0 
  +                        && (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
  +                                                    conf->recv_buffer_size))) {
                       ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
  -                                  "proxy: FTP: setsockopt(SO_RCVBUF): Failed to set ProxyReceiveBufferSize,
using default");
  +                                  "proxy: FTP: apr_socket_opt_set(SO_RCVBUF): Failed to
set ProxyReceiveBufferSize, using default");
                   }
   #endif
   
  @@ -1418,7 +1421,8 @@
           apr_sockaddr_port_get(&local_port, local_addr);
           apr_sockaddr_ip_get(&local_ip, local_addr);
   
  -        if ((rv = apr_setsocketopt(local_sock, APR_SO_REUSEADDR, one)) != APR_SUCCESS)
{
  +        if ((rv = apr_socket_opt_set(local_sock, APR_SO_REUSEADDR, one)) 
  +                != APR_SUCCESS) {
   #ifndef _OSD_POSIX              /* BS2000 has this option "always on" */
               ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
                             "proxy: FTP: error setting reuseaddr option");
  
  
  
  1.97      +3 -3      httpd-2.0/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_util.c,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- proxy_util.c	15 Jul 2002 07:46:19 -0000	1.96
  +++ proxy_util.c	15 Jul 2002 08:05:10 -0000	1.97
  @@ -1148,10 +1148,10 @@
   
   #if !defined(TPF) && !defined(BEOS)
           if (conf->recv_buffer_size > 0 &&
  -            (rv = apr_setsocketopt(*newsock, APR_SO_RCVBUF,
  -                                   conf->recv_buffer_size))) {
  +            (rv = apr_socket_opt_set(*newsock, APR_SO_RCVBUF,
  +                                     conf->recv_buffer_size))) {
               ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
  -                         "setsockopt(SO_RCVBUF): Failed to set "
  +                         "apr_socket_opt_set(SO_RCVBUF): Failed to set "
                            "ProxyReceiveBufferSize, using default");
           }
   #endif
  
  
  
  1.307     +1 -1      httpd-2.0/modules/http/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_core.c,v
  retrieving revision 1.306
  retrieving revision 1.307
  diff -u -r1.306 -r1.307
  --- http_core.c	7 Jul 2002 16:35:20 -0000	1.306
  +++ http_core.c	15 Jul 2002 08:05:11 -0000	1.307
  @@ -308,7 +308,7 @@
               csd = ap_get_module_config(c->conn_config, &core_module);
               csd_set = 1;
           }
  -        apr_setsocketopt(csd, APR_INCOMPLETE_READ, 1);
  +        apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 1);
       }
    
       return OK;
  
  
  
  1.111     +4 -4      httpd-2.0/support/ab.c
  
  Index: ab.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/ab.c,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- ab.c	11 Jul 2002 13:44:12 -0000	1.110
  +++ ab.c	15 Jul 2002 08:05:11 -0000	1.111
  @@ -717,7 +717,7 @@
   #ifdef USE_SSL
               if (ssl != 1)
   #endif
  -	    apr_setsocketopt(c->aprsock, APR_SO_TIMEOUT, 0);
  +	    apr_socket_timeout_set(c->aprsock, 0);
   	    c->connect = tnow;
   	    c->rwrite = reqlen;
   	    c->rwrote = 0;
  @@ -1225,7 +1225,7 @@
   				SOCK_STREAM, c->ctx)) != APR_SUCCESS) {
   	apr_err("socket", rv);
       }
  -    if ((rv = apr_setsocketopt(c->aprsock, APR_SO_NONBLOCK, 1))
  +    if ((rv = apr_socket_opt_set(c->aprsock, APR_SO_NONBLOCK, 1))
            != APR_SUCCESS) {
           apr_err("socket nonblock", rv);
       }
  
  
  

Mime
View raw message