httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stodd...@apache.org
Subject cvs commit: httpd-2.0/server listen.c
Date Fri, 09 Mar 2001 18:28:57 GMT
stoddard    01/03/09 10:28:57

  Modified:    server   listen.c
  Log:
  Fix a Windows seg fault on startup when multiple listen directives are being used.
  
  The pool pointer in the local address field in apr_sock_t is not initialized until a
  request is received.  in general, we should not rely on the addressed in apr_sock_t
  when doing work on the listen_recs.
  
  Revision  Changes    Path
  1.50      +1 -4      httpd-2.0/server/listen.c
  
  Index: listen.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/listen.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- listen.c	2001/02/16 04:26:47	1.49
  +++ listen.c	2001/03/09 18:28:55	1.50
  @@ -225,7 +225,7 @@
   
       /* see if we've got an old listener for this address:port */
       for (walk = &old_listeners; *walk; walk = &(*walk)->next) {
  -        apr_socket_addr_get(&sa, APR_LOCAL, (*walk)->sd);
  +        sa = (*walk)->bind_addr;
           apr_sockaddr_port_get(&oldport, sa);
   	apr_sockaddr_ip_get(&oldaddr, sa);
   	if (!strcmp(oldaddr, addr) && port == oldport) {
  @@ -253,9 +253,6 @@
                        "alloc_listener: failed to get a socket for %s", addr);
           return;
       }
  -    apr_socket_addr_get(&sa, APR_LOCAL, new->sd);
  -    apr_sockaddr_port_set(sa, port);
  -    apr_sockaddr_ip_set(sa, addr);
       new->next = ap_listeners;
       ap_listeners = new;
   }
  
  
  

Mime
View raw message