httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/support ab.c
Date Sun, 19 Nov 2000 14:27:48 GMT
trawick     00/11/19 06:27:47

  Modified:    src/modules/proxy proxy_connect.c proxy_http.c
               src/support ab.c
  Log:
  Call apr_create_socket() instead of apr_create_tcp_socket() (deprecated).
  
  Revision  Changes    Path
  1.18      +1 -1      apache-2.0/src/modules/proxy/proxy_connect.c
  
  Index: proxy_connect.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/proxy/proxy_connect.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- proxy_connect.c	2000/11/18 17:13:29	1.17
  +++ proxy_connect.c	2000/11/19 14:27:43	1.18
  @@ -172,7 +172,7 @@
               "CONNECT to %s on port %d", host, port);
       }
   
  -    if ((apr_create_tcp_socket(&sock, r->pool)) != APR_SUCCESS) {
  +    if ((apr_create_socket(&sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS)
{
           ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
               "proxy: error creating socket");
           return HTTP_INTERNAL_SERVER_ERROR;
  
  
  
  1.25      +1 -1      apache-2.0/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- proxy_http.c	2000/11/18 17:13:29	1.24
  +++ proxy_http.c	2000/11/19 14:27:43	1.25
  @@ -246,7 +246,7 @@
   				 "Connect to remote machine blocked");
       }
   
  -    if ((apr_create_tcp_socket(&sock, r->pool)) != APR_SUCCESS) {
  +    if ((apr_create_socket(&sock, APR_INET, SOCK_STREAM, r->pool)) != APR_SUCCESS)
{
           ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                         "proxy: error creating socket");
           return HTTP_INTERNAL_SERVER_ERROR;
  
  
  
  1.34      +10 -5     apache-2.0/src/support/ab.c
  
  Index: ab.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/support/ab.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- ab.c	2000/11/17 03:45:02	1.33
  +++ ab.c	2000/11/19 14:27:45	1.34
  @@ -492,11 +492,16 @@
       c->cbx = 0;
       c->gotheader = 0;
   
  -    if ((rv = apr_getaddrinfo(&destsa, hostname, AF_INET, port, 0, cntxt))
  +    if ((rv = apr_getaddrinfo(&destsa, hostname, APR_UNSPEC, port, 0, cntxt))
            != APR_SUCCESS) {
  -        apr_err("apr_getaddrinfo()", rv);
  +        char buf[120];
  +
  +        apr_snprintf(buf, sizeof(buf), 
  +                     "apr_getaddrinfo() for %s", hostname);
  +        apr_err(buf, rv);
       }
  -    if ((rv = apr_create_tcp_socket(&c->aprsock, cntxt)) != APR_SUCCESS) {
  +    if ((rv = apr_create_socket(&c->aprsock, destsa->sa.sin.sin_family, 
  +                                SOCK_STREAM, cntxt)) != APR_SUCCESS) {
           apr_err("Socket:", rv);
       }
       c->start = apr_now();
  @@ -878,14 +883,14 @@
   static void copyright(void)
   {
       if (!use_html) {
  -        printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.33 $>
apache-2.0");
  +        printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.34 $>
apache-2.0");
           printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
           printf("Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/\n");
           printf("\n");
       }
       else {
           printf("<p>\n");
  -        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i>
apache-2.0<br>\n", AB_VERSION, "$Revision: 1.33 $");
  +        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i>
apache-2.0<br>\n", AB_VERSION, "$Revision: 1.34 $");
           printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
           printf(" Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/<br>\n");
           printf("</p>\n<p>\n");
  
  
  

Mime
View raw message