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/server/mpm/winnt mpm_winnt.c
Date Sat, 18 May 2002 21:43:25 GMT
wrowe       02/05/18 14:43:25

  Modified:    server/mpm/winnt mpm_winnt.c
  Log:
    As the prior commit message indicated, pass the accept thread a listen
    rec as opposed to simply the listen socket.
  
    However, the prior commit (which I crossed up with this patch) really
    closed a segfault where we attempted to log messages to ap_server_conf,
    after the server conf was destroyed, and prior to setting the new
    value in the next go-around of post_config.
  
  Revision  Changes    Path
  1.274     +7 -6      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.273
  retrieving revision 1.274
  diff -u -r1.273 -r1.274
  --- mpm_winnt.c	18 May 2002 21:41:36 -0000	1.273
  +++ mpm_winnt.c	18 May 2002 21:43:24 -0000	1.274
  @@ -924,15 +924,16 @@
    *    Worker threads block on the ThreadDispatch IOCompletionPort awaiting 
    *    connections to service.
    */
  -static void winnt_accept(void *listen_socket) 
  +static void winnt_accept(void *lr_) 
   {
  +    ap_listen_rec *lr = (ap_listen_rec *)lr_;
       apr_os_sock_info_t sockinfo;
       PCOMP_CONTEXT context = NULL;
       DWORD BytesRead;
       SOCKET nlsd;
       int rv;
   
  -    nlsd = (SOCKET) listen_socket;
  +    apr_os_sock_get(&nlsd, lr->sd);
   
       while (!shutdown_in_progress) {
           if (!context) {
  @@ -1190,14 +1191,14 @@
           _beginthreadex(NULL, 0, (LPTHREAD_START_ROUTINE) win9x_accept,
                          NULL, 0, &tid);
       } else {
  -        /* Start an accept thread per listener */
  -        SOCKET nlsd; /* native listening sock descriptor */
  +        /* Start an accept thread per listener 
  +         * XXX: Why would we have a NULL sd in our listeners?
  +         */
           ap_listen_rec *lr;
           for (lr = ap_listeners; lr; lr = lr->next) {
               if (lr->sd != NULL) {
  -                apr_os_sock_get(&nlsd, lr->sd);
                   _beginthreadex(NULL, 1000, (LPTHREAD_START_ROUTINE) winnt_accept,
  -                               (void *) nlsd, 0, &tid);
  +                               (void *) lr, 0, &tid);
               }
           }
       }
  
  
  

Mime
View raw message