httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ron...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/network_io/unix sockets.c
Date Thu, 09 Mar 2000 10:18:53 GMT
ronald      00/03/09 02:18:53

  Modified:    src/lib/apr/network_io/unix sockets.c
  Log:
  fill in local_addr with correct data; this gets virtual hosts working again
  
  Revision  Changes    Path
  1.28      +5 -2      apache-2.0/src/lib/apr/network_io/unix/sockets.c
  
  Index: sockets.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/sockets.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- sockets.c	2000/01/01 01:53:07	1.27
  +++ sockets.c	2000/03/09 10:18:53	1.28
  @@ -187,7 +187,6 @@
       (*new)->cntxt = connection_context;
       (*new)->local_addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, 
                    sizeof(struct sockaddr_in));
  -    memcpy((*new)->local_addr, sock->local_addr, sizeof(struct sockaddr_in));
   
       (*new)->remote_addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, 
                    sizeof(struct sockaddr_in));
  @@ -202,7 +201,11 @@
       if ((*new)->socketdes < 0) {
           return errno;
       }
  -    
  +
  +    if (getsockname((*new)->socketdes, (*new)->local_addr, &((*new)->addr_len))
< 0) {
  +	return errno;
  +    }
  +
       ap_register_cleanup((*new)->cntxt, (void *)(*new), 
                           socket_cleanup, ap_null_cleanup);
       return APR_SUCCESS;
  
  
  

Mime
View raw message