httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stoddard <stodd...@locus.apache.org>
Subject cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c
Date Thu, 06 Jul 2000 17:48:42 GMT
stoddard    00/07/06 10:48:41

  Modified:    src/modules/mpm/winnt mpm_winnt.c
  Log:
  Temporarily disable lingerling close until I can get the sendfile path right.
  This avoids a seg fault when we try to shutdown then close a socket that has
  been reset by the client.
  
  Revision  Changes    Path
  1.85      +14 -7     apache-2.0/src/modules/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- mpm_winnt.c	2000/07/06 15:13:29	1.84
  +++ mpm_winnt.c	2000/07/06 17:48:41	1.85
  @@ -1068,7 +1068,7 @@
       PCOMP_CONTEXT context = NULL;
   
       while (1) {
  -        conn_rec *current_conn;
  +        conn_rec *c;
           ap_iol *iol;
           ap_int32_t disconnected;
   
  @@ -1093,12 +1093,12 @@
               continue;
           }
           ap_bpush_iol(context->conn_io, iol);
  -        current_conn = ap_new_connection(context->ptrans, server_conf, context->conn_io,
  -                                         (struct sockaddr_in *) context->sa_client,
  -                                         (struct sockaddr_in *) context->sa_server,
  -                                         child_num);
  +        c = ap_new_connection(context->ptrans, server_conf, context->conn_io,
  +                              (struct sockaddr_in *) context->sa_client,
  +                              (struct sockaddr_in *) context->sa_server,
  +                              child_num);
   
  -        ap_process_connection(current_conn);
  +        ap_process_connection(c);
   
   
           ap_getsocketopt(context->sock, APR_SO_DISCONNECTED, &disconnected);
  @@ -1111,7 +1111,14 @@
           }
           else {
               context->accept_socket = INVALID_SOCKET;
  -            ap_lingering_close(current_conn);
  +            /* Disable lingering close for the moment to fix a seg fault.
  +             * All the sendfile code needs some serious work to return 
  +             * proper error values, handle updating bytes_sent, etc.
  +             * I'll enable lingering close after I've fixed the sendfile
  +             * code
  +             * ap_lingering_close(c);
  +             */
  +            ap_bclose(c->client);
           }
       }
   
  
  
  

Mime
View raw message